Reputation: 2662
Please have a look at this script.
Here is my problem: I want both events to be fired by the click event. The thing is one of them returns false, what logically makes jquery ignore the second one (and I need it to return false).
Any idea how I can achieve this ?
Thanks in advance !
Upvotes: 0
Views: 149
Reputation: 707406
Do you have to use two separate click event handlers? You could just put two function calls in one click handler.
Upvotes: 1
Reputation: 18557
Use event.stopPropagation()
http://api.jquery.com/event.stopPropagation/
Upvotes: 0
Reputation: 887449
Instead of return false
, call e.preventDefault()
.
return false
is equivalent to both e.preventDefault()
and e.stopPropagation()
.
Upvotes: 1