双击打开引导模式 [英] Opening bootstrap modal with double click

查看:20
本文介绍了双击打开引导模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打开模态双击.我正在使用这段代码,但它不起作用:

I'm trying to open a modal double clicking. I'm using this piece of code but it's not working:

$('#link').dblclick(function () {
  $('#myModal').modal('toggle');
});

这里的小提琴:http://jsfiddle.net/labanino/JKEj3/

谢谢!

推荐答案

你需要从链接中删除 data-toggle="modal"..

You need to remove data-toggle="modal" from the link..

<a href="#myModal" role="button" class="btn" id="link">Launch modal</a>

http://jsfiddle.net/JKEj3/3/

这篇关于双击打开引导模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆