bootstrap是一款非常优秀的框架,当然quickly也是很不错的,在使用bootstrap的时候,遇到一个问题,就是默认当菜单有子菜单的时候,大栏目是无法点击的,href=“#”是无法跳转的,只需要加上下面这一句JS代码,即可解决。
$(document).on("click",".dropdown-toggle",function(){
if($(this).attr('href')) window.location = $(this).attr('href');
});
bootstrap的 modal模态框打开自动播放视频
//弹出自动播放
$('[data-toggle=modal]').each(function(){
var v = $(this).attr('data-target');
$(v).on('show.bs.modal', function (e) {
$(v).find('video')[0].play();
})
$(v).on('hidden.bs.modal', function (e) {
$(v).find('video')[0].pause();
})
})
标签:bootstrap
关注“qietuwang”微信公众号,获取一手干货内容推送
本文由切图网原创,转载请保留版权:
微信扫一扫二维码访问