【发布时间】:2010-11-13 04:03:02
【问题描述】:
代码:
HTML
<!-- snip -->
<div class="parent" id="parent">
<div class="child" id="child">
</div>
</div>
<!-- snip -->
Javascript
/* snip */
$(function () {
$("#parent").click(function () {
alert("This dialog should only show up if the parent is clicked.");
});
});
/* snip */
(这只是实际代码的基本结构......在实际代码中有些东西是不同的,例如child是一个jQuery UI Draggable元素)
【问题讨论】:
标签: javascript jquery html css