bootstrap switch赋值不生效

bootstrap自带的switch的赋值开关办法为

 $("#Modal_State").attr("checked",true);

但是如果独立用Bootstrap Switch开关控件,自己的css和库的话,就需要用下面这种方式:

$("#Modal_State").bootstrapSwitch('state',true);

 

posted @ 2020-07-23 14:59  neverthelessing  阅读(176)  评论(0)    收藏  举报