【发布时间】:2011-01-28 06:32:42
【问题描述】:
试图围绕 jQuery ".not()" 函数来解决问题,但遇到了问题。我想让父 div 成为“可点击”,但如果用户点击子元素,则不会调用脚本。
$(this).not(children()).click(function(){
$(".example").fadeOut("fast");
});
html:
<div class="example">
<div>
<p>This content is not affected by clicks.</p>
</div>
</div>
【问题讨论】:
标签: jquery