Toggle functionality within Bootstrap 4 is currently experiencing issues and is not functioning properly

I integrated this bootstrap Toggle into my Bootstrap 4 project,

However, it seems to not be functioning properly with Bootstrap 4.

Does anyone have a solution for this issue?

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>


<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>


<input type="checkbox" checked data-toggle="toggle">

Answer №1

Include Bootstrap CSS in your project

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>


<input type="checkbox" checked data-toggle="toggle">

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The process of setting up a carousel for tables using jQuery

I can successfully implement jquery for an image carousel, but now I need to find a way to create a sliding table format. Any assistance on this matter would be greatly appreciated. Here is the code I currently have: <ul> <li><a style= ...

After clicking, an created modal is displayed, then disappears on its own

After creating 2 Modals, I encountered an issue where the second modal with the class "category-modal" reverts back to display none when I click the "+" sign on the form. The first modal, with the class "modal," displays correctly when the add button is cl ...

How can the $spacer variable in Bootstrap be modified?

My attempt to adjust the $spacer variable in SASS to increase margins seems to be failing. Here is my code: @import url(../node_modules/bootstrap/scss/_functions.scss); @import url(../node_modules/bootstrap/scss/_variables.scss); @import url(../node_module ...

Ways to gradually reveal all elements within a header section

Is there a way to gradually reveal all the components in my header once the window has finished loading by utilizing jQuery's fadeIn function? Below is the pertinent code snippet: HTML <div class="banner"> <header class="header"> < ...

Maintain the default material-ui class styles while making customizations to override others

Currently, I am working on customizing the material-ui tooltip and specifically need to adjust the margin for the tooltipPlacementTop class: const useStyles = makeStyles(theme => ({ tooltipPlacementTop: { margin: '4px 0' ...

Keep the first column of an HTML table fixed as you scroll horizontally

Below is an HTML table that I have created: <table id="customers" class="table table-bordered" width="100%"> <thead> <tr> <th colspan="2">Activities</th> <th>Mon 17</th> <th>Tue 18</th> </thead> ...

Is it possible to customize the formatting of the information displayed within a details tag when it is nested under a summary

Is there a way to format the details information so that it aligns underneath the summary tag? Currently, both lines of text are aligned to the left. <details> <summary> Summary 1 </summary> Details 1 </details> ...

Aligning a label in the center of a horizontal layout's vertical axis

Struggling with centering a QLabel vertically in a QHBoxLayout. Here's the relevant part of my code: QFrame* topBar = new QFrame(); topBar->setStyleSheet("background-color: #2c3d50;border-bottom: 3px solid #2c92b6;"); topBar->setSizePolicy(QSiz ...

Tips for enlarging the box width using animation

How can I create an animation that increases the width of the right side of a box from 20px to 80px by 60px when hovered over? What would be the jQuery code for achieving this effect? ...

How can CSS be used to prevent line breaks between elements in a web page?

div#banner>img { float: left; background-color: #4b634b; height: 265px; width: 80%; } ul { float: left; background-color: #769976; width: 162px; } <body> <div id="wrapper"> <header> <nav> <ul ...

Animate the sliding up of divs using Jquery SlideToggle

Is there a way to make this perfect example slide up instead of pushing the 'navs' down? View Example Here Currently, it reveals from top to bottom (pushing the menu down), but I want it to slide up and push the navs up when clicked. The fiddl ...

Issue with connecting Drupal 8 theme styling to website pages

Although the theme is functioning properly, the CSS styles are not being applied. Even when inspecting the developer console in Firefox, there seems to be a disconnect with the page. I verified that manually applying the CSS through the developer console i ...

Configuration of flexbox for cordova on a Samsung Galaxy Tab running on Android version 4.1.2

I am having trouble using flexbox css to design a cordova app on a Galaxy Tab running Android 4.1.2 Here is the CSS code I am currently using: .container { /*display: flex; display: -webkit-box;*/ display: -webkit-flex; /*justify-content: ...

align the bootstrap when the screen resolution is less than 900 pixels

As a newbie in web development and Bootstrap, I'm working on creating a responsive website. Everything was going smoothly until I encountered an issue when transitioning from desktop to mobile view. I have three buttons aligned in a row on desktop, bu ...

Creating a unique CSS selector to locate the pages tab on Facebook using Selenium

My attempt to direct my chrome driver to the correct CSS locator in order to refine the search only to Facebook pages is proving to be a challenge. When inspecting the element, the HTML code is as follows: https://i.sstatic.net/8XVPs.png I decided to manu ...

What is the best way to implement a responsive navigation bar for mobile devices using Bootstrap 4 integrated with Vue

I've been putting in a lot of effort to create a responsive navbar using Bootstrap 4 with Vue. Here is the code in my App.vue file: NavBar <b-navbar-nav> <b-nav-item href="#">Link</b-nav-item> <b-nav-item href="#" disabled ...

How can I adjust a centered container div to fit properly on a mobile device

Exploring the centering of a particular div: #container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 550px; width: auto; background: rgba(28, 28, 54, 0.70); padding: 15px; border: 1px solid #1c ...

Adjust the background color as you scroll

I am looking to create a functionality where the background-color of my header changes to match the background-color of the div it is currently scrolling past. For example, if the user scrolls to the #about section (which has a green background), I want th ...

Elevated Positioning of Footer in Bootstrap

Hello, thank you in advance for any help offered. The website in question can be accessed through this link: caulfield.co/test/ I am working on implementing a parallax footer reveal effect using Bootstrap 4. I am having difficulty adjusting the z-index of ...

Having trouble getting AngularJS ngCloak to function properly?

My post category page is supposed to display a message if there are no posts. However, the HTML appears briefly when the page loads and then hides. I thought using ngCloak would solve this issue, but it doesn't seem to be working for me. Here's t ...