开发者

How to cause same effect of child on parent

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜