i开发者_如何学JAVAs there a way to cast the same effect of a child on a parent?
<div id = "parent">
<div id = "child">
</div>
//button.click to .show("slide") child
</div>
How can I cast that same effect on the parent for the same event fired?
Something like this:
$("#child").click(function() {
$(this).slideToggle(function() {
$(this).parent().slideToggle();
});
});
or this:
$("#child").click(function() {
$(this).parent().slideToggle();
});
try trigger
it
精彩评论