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.
精彩评论