You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">--> <!--<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>--> <link href="bootstrap-switch.css" rel="stylesheet"> <script src="https://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="bootstrap-switch.js"></script> <title>Bootstrap switch: test</title> </head> <body> <div class="container" style="height:40px;"> <input type="checkbox" name="my-checkbox" checked> </div> <div class="container"> <input type="checkbox" name="my-checkbox2" checked> </div> <script> /*var obj = $("[name='my-checkbox']"); obj.bootstrapSwitch({ state: false, readonly: false, size: 'small', /*onSwitchChange: function(event, state) { event.preventDefault(); return console.log(state, event.isDefaultPrevented()); } }); obj.bootstrapSwitch('state', true, false); //obj.bootstrapSwitch('disabled', true); console.log(obj[0].checked);*/ </script> </body> </html>
|