为什么我的第二个弹出“Basic2”不起作用? 这是我的笔的链接: http://codepen.io/wdcris/pen/szkIB
看起来很基础,但我无法让它工作:(
最佳答案
根据 http://leanmodal.finelysliced.com.au/ 上的文档:
if you want more than one modal window on the same page, simply add the 'rel' attribute to your triggers, and call the function by attribute, like so:
$("a[rel*=leanModal]").leanModal();
您需要将 rel="leanModal"
属性添加到您的触发链接,然后将 .leanModal()
方法绑定(bind)到具有该 的所有链接rel="leanModal"
属性。
这是您的示例,经过简化和修复后可以正常工作:http://codepen.io/anon/pen/yqKrx
希望这对您有所帮助!
关于javascript - 无法使用 leanModal 弹出两个不同的弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23373041/