【发布时间】:2012-02-18 04:22:29
【问题描述】:
我似乎无法让它停止传播..
$(document).ready(function(){
$("body").on("click","img.theater",function(event){
event.stopPropagation();
$('.theater-wrapper').show();
});
// This shouldn't fire if I click inside of the div that's inside of the
// `.theater-wrapper`, which is called `.theater-container`, anything else it should.
$(".theater-wrapper").click(function(event){
$('.theater-wrapper').hide();
});
});
【问题讨论】:
标签: javascript jquery stoppropagation propagation