The difference between ‘return false;’ and ‘e.preventDefault();’

Have you ever seen those two things (in the title) being used in jQuery? Here is a simple example: $(“a”).click(function() { $(“body”).append($(this).attr(“href”)); return false; } That code would append the href attribute as text to the body every time a link was clicked but not actually go to that link. The return false; part of … Continue reading The difference between ‘return false;’ and ‘e.preventDefault();’