开发者

Why doesn't this event unbind using jQuery?

I have seen similar questions but I can't figure out what I am doing wrong here. The dropdown is shown after an ajax call completes successfully then I want to hide it when a user clicks anywhere. I would like to rem开发者_如何转开发ove the event though because there is no need to hide it if it is already hidden.

        dropDown.slideDown('fast');
        $(document).bind('click.test', function() {
            alert('click');
            dropDown.slideUp('fast');
            $(document).unbind('click.test');
        });

Any thoughts?


You can call the one method instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜