I'm using bootstrap checkbox with data-toggle="toggle" attribute. I want to set it checked and unchecked with jquery. I tried many ways but it didn't work. Here is my code.
<input type="checkbox" data-toggle="toggle" data-size="small" id="checkbox1">
for button click:
$("#checkbox").attr('checked',true);
But it's working when I remove data-toggle="toggle" attribute.
Any help is greatly appreciated!
Thanks.
Aucun commentaire:
Enregistrer un commentaire