Thursday 14 April 2016

jQuery return false; vs e.preventDefault()

return false;

is equal to

e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();

So the lesson is never use 'return false' unless you completely understand it.

Reference: http://fuelyourcoding.com/jquery-events-stop-misusing-return-false/comment-page-2/#comment-73556