I am using Bootstrap Switch for Twitter Bootstrap. Here I have problem to check or uncheck all checkbox based on global checkbox checked or unchecked
Here is the boo
Try this:
then in your script
$('#rowSelectAll').on('change', function(){
$('.myswitch').each(function(){
if($(this).hasClass('switch-on')){
$(this).bootstrapSwitch('setState' , false);
$(this).removeClass('switch-on');
}else{
$(this).bootstrapSwitch('setState' , true);
$(this).addClass('switch-on');
}
});
});