Check box in Bootstrap Drop down list

Developer
Size
2,170 Kb
Views
20,240

How do I make an check box in bootstrap drop down list?

What is a check box in bootstrap drop down list? How do you make a check box in bootstrap drop down list? This script and codes were developed by Tommy on 30 December 2022, Friday.

Check box in Bootstrap Drop down list Previews

Check box in Bootstrap Drop down list - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Check box in Bootstrap Drop down list</title> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body{ padding: 20px;
}
label{ font-weight: normal;
}
.dropdown-header{ color: #000;
}
.checkbox-in-ddl input[type=checkbox]{ margin-left: 20px; margin-right: 4px;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> hoehoe </button> <ul class="dropdown-menu" role="menu"> <li><a href="#">Foooooo</a></li> <li class="dropdown-header"><b>Dropdown-header</b></li> <li class="checkbox-in-ddl"> <label> <input type="checkbox" />Check box1 </label> </li> <li class="checkbox-in-ddl"> <label> <input type="checkbox" />Check box2 </label> </li> <li class="checkbox-in-ddl"> <label> <input type="checkbox" />Check box3 </label> </li> <li><a href="#">Bar</a></li> </ul>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Check box in Bootstrap Drop down list - Script Codes CSS Codes

body{ padding: 20px;
}
label{ font-weight: normal;
}
.dropdown-header{ color: #000;
}
.checkbox-in-ddl input[type=checkbox]{ margin-left: 20px; margin-right: 4px;
}

Check box in Bootstrap Drop down list - Script Codes JS Codes

$('li').on('click', function(e) { if($(this).hasClass('checkbox-in-ddl') || $(this).hasClass('dropdown-header')) { e.stopPropagation(); // <-------- POINT :D }
});
Check box in Bootstrap Drop down list - Script Codes
Check box in Bootstrap Drop down list - Script Codes
Home Page Home
Developer Tommy
Username hoehoe
Uploaded December 30, 2022
Rating 3
Size 2,170 Kb
Views 20,240
Do you need developer help for Check box in Bootstrap Drop down list?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tommy (hoehoe) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!