遵循这些intructions,我需要什么,但是如果我想从该规则中排除/阻止某些模态,该怎么办?
$(".modal a").click(function(){ $(this).closest(".modal").modal("hide");});
最佳答案
提供要排除类的所有模态,例如class="noclose"
。然后将其添加到选择器。
$(".modal:not(.noclose) a").click(function(){
$(this).closest(".modal").modal("hide");
});