I'm using bootstrap-switch in my checkboxes and would like to check the status of my checkbox
when loading the page using the library itself.
I'm using bootstrap-switch in my checkboxes and would like to check the status of my checkbox
when loading the page using the library itself.
If you use .bootstrapSwitch('state')
, it will return the state of your checkbox. Here's the library :)
To get the status after loading the page, you can use the code below:
//evento executado após a pagina ser carregada..
$(document).ready(function() {
//método para busca do estado
var state = $("#seuCheckbox").bootstrapSwitch('state');
});
Follow the fiddle :)