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:
Battery coating is the process of applying uniform layers of active materials—such as cathode and…
Let’s face it. Tech buzzwords get thrown around a lot—especially when it comes to how…
In today’s digital world, the boundaries between technology, finance, and innovation are rapidly disappearing. Businesses…
Backyard gatherings like BBQs, family reunions, and garden parties are an exciting way to enjoy…
Marketers are always on the lookout for more effective ways to reach their target audiences.…
Does your phone control your mind more than you control your phone? Modern life exploits…