Bootstrap switch checked event?

前端 未结 9 1557
感情败类
感情败类 2021-01-31 14:48

I use this codes for checkbox checked event but it does not work.

css



        
9条回答
  •  春和景丽
    2021-01-31 15:25

    This is the way that I use it:

    HTMl:

    
    

    JQuery:

    $('.switcher').on('switchChange.bootstrapSwitch', function(event, state) {
        if (state)
        {
            // Checked
        }else
        {
            // Is not checked
        }
    });
    

    I hope it is helpful!!

提交回复
热议问题