2
I’m using bootstrap-switch in my checkboxes and I would like to check the status of my checkbox
loading the page using the library itself.
2
I’m using bootstrap-switch in my checkboxes and I would like to check the status of my checkbox
loading the page using the library itself.
2
Just use .bootstrapSwitch('state')
, it will return the status of your checkbox. It follows the events 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');
});
Follows the fiddle :)
Browser other questions tagged javascript jquery twitter-bootstrap
You are not signed in. Login or sign up in order to post.
Thanks man, I hadn’t thought to do that. To breaking my head has 2 days. kkk Thank you very much :D
– Matheus Velloso
Glad it worked out, I’m in the mood :)
– Brunno