enhanced bootstrap switch js part in demo

This commit is contained in:
REJack
2019-09-13 14:41:19 +02:00
parent 7bb5b47bff
commit 487ccecf05

View File

@@ -1286,8 +1286,11 @@
$('.my-colorpicker2').on('colorpickerChange', function(event) {
$('.my-colorpicker2 .fa-square').css('color', event.color.toString());
});
$("[data-bootstrap-switch]").bootstrapSwitch();
$("input[data-bootstrap-switch]").each(function(){
$(this).bootstrapSwitch('state', $(this).prop('checked'));
});
})
</script>
</body>