preventDefault() prevents the default event from occuring, stopPropagation() prevents the event from bubbling up and return false does the both.
$('a').click(function() {
return false;
});
$('a').click(function(e) {
e.preventDefault();
});
So finally, return false from within a jQuery event handler is effectively same as calling both e.preventDefault and e.stopPropagation on the passed jQuery.Event object.
Read event.preventDefault() from jQuery reference.
return false is doing 3 separate things when you call it:
Read:
People usually stumble onto the 461 visa when they realise there’s no simple way to…
In today’s digital era, people look for convenience, transparency, and genuine rewards from their financial…
If you are planning to start a lighting business and looking for a supplier of…
If you are a copywriter or a content marketer, you will second my statement that…
Motorcycle accidents often lead to severe injuries because riders have minimal protection compared to drivers…
No business owner starts his or her business with the hope of making losses. Everyone…