You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
821 B

var ComponentsBootstrapSwitch = function () {
var handleBootstrapSwitch = function() {
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioState');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck', false);
});
}
return {
//main function to initiate the module
init: function () {
handleBootstrapSwitch();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapSwitch.init();
});