GIJGO
Run Example
Close Window
<html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Checkbox</title> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script> <link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="container-fluid" style="margin-top:10px"> <input type="checkbox" id="checkbox" /><br /> <button onclick="$chkb.state('checked')" class="btn btn-default">Checked</button> <button onclick="$chkb.state('unchecked')" class="btn btn-default">Unchecked</button> <button onclick="$chkb.state('indeterminate')" class="btn btn-default">Indeterminate</button> <button onclick="$chkb.prop('disabled', false)" class="btn btn-default">Enable</button> <button onclick="$chkb.prop('disabled', true)" class="btn btn-default">Disable</button> </div> <script> var $chkb = $('#checkbox').checkbox({ uiLibrary: 'bootstrap5' }); </script> </body> </html>