问题描述
我使用material dashboard,我选择了使用引导选择,
从内置模板中进行选择:
if($(".selectpicker").length != 0){
$(".selectpicker").selectpicker();
}
以上的初始化代码在我迁移到Turbolink时出错 然后我发现了这种讨论https://github.com/snapappointments/bootstrap-select/issues/1413并在我的网站上应用了
这是我的init元素:
$(document).on('turbolinks:load',function(){
$(".selectpicker").selectpicker();
});
$(document).on('turbolinks:before-cache',function(){
$('.selectpicker').selectpicker('destroy').addClass('selectpicker');
});
任何人都可以帮助我吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)