jQuery Plugin To Create Custom Checkbox Using Bootstrap Glyphicons - bs-checkbox
File Size: | 3.86 KB |
---|---|
Views Total: | 1544 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
bs-checkbox is a super tiny jQuery plugin to create custom checkbox inputs that use Bootstrap's Glyphicons for check/uncheck symbols.
How to use it:
1. Include the required Bootstrap's Glyphicon icon font on the webpage.
<link rel="stylesheet" href="bootstrap.min.css">
2. Include the jQuery bs-checkbox plugin's script after jQuery library but before the closing body tag.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="bs-checkbox.js"></script>
3. Wrap your checkbox into an inline element with the CSS class of 'bs-checkbox'.
<span class="bs-checkbox"> <input type="checkbox" checked="checked"> </span>
4. Just call the plugin and done.
$('.bs-checkbox').bsCheckbox();
5. Apply your own CSS styles to the checkbox.
.bs-checkbox { cursor: pointer; } .bs-checkbox input { display: none; }
This awesome jQuery plugin is developed by ktasos. For more Advanced Usages, please check the demo page or visit the official website.