Reputation: 37464
I'm doing a very simple slideToggle() here:
$("#loginBtn").click(function(){
$("#login").slideToggle();
return false;
});
What i'm asking is, how do i intercept the slideToggle, so once the user clicks #loginBtn and #login slides down, they can either click #loginBtn again to slide it up OR they can click another element to slide #login up? But only the #loginBtn slides down the #login?
Thanks
Upvotes: 2
Views: 139
Reputation: 342635
Bind some slideUp
goodness to your 'other elements'?
$(".otherButtons").click(function() {
$("#login").slideUp();
return false;
});
Upvotes: 2