单击链接时模式关闭时除外 [英] Except a modal from closing when click on a link
本文介绍了单击链接时模式关闭时除外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
遵循这些指令可以满足我的要求,但是如果我想排除/阻止某些模态遵循此操作,该怎么办?规则?
Following these intructions does what I need but what if I want to except/prevend some of the modals from following this rule?
$(".modal a").click(function(){ $(this).closest(".modal").modal("hide");});
推荐答案
给出要排除类的所有模态,例如class="noclose"
.然后将其添加到选择器.
Give all the modals that you want to exclude a class, like class="noclose"
. Then add that to the selector.
$(".modal:not(.noclose) a").click(function(){
$(this).closest(".modal").modal("hide");
});
这篇关于单击链接时模式关闭时除外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文