views:

28

answers:

1

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 succesfully then I want to hide it when a user clicks anywhere. I would like to remove 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???

+2  A: 

You can call the one method instead.

SLaks
Worked like a charm thanks!
Mike