2
Answers

What happen if you return false from a jQuery event handler?

Photo of Tapan Mallick

Tapan Mallick

7y
1.3k
1
What happen if you return false from a jQuery event handler? 

Answers (2)

0
Photo of Rajkiran Swain
28 40.7k 3.4m 7y
It used to stop the event bubbling up
Accepted
0
Photo of Yatendrasinh Joddha
NA 1.4k 318.6k 7y
return false from within a jQuery event handler is effectively the same as calling both e.preventDefault and e.stopPropagation.
 
e.preventDefault() will prevent the default event from occuring, e.stopPropagation() will prevent the event from bubbling up and return false will do both 
 
Read here for more : https://stackoverflow.com/questions/1357118/event-preventdefault-vs-return-false