preventDefault and return false are not the same in jQuery

In a jQuery handler, return false is shorthand for calling both preventDefault() and stopPropagation(). Most code that uses it only wanted the first — stopping the link from navigating — and gets the second without noticing, because nothing on the page is watching for the event yet at the time it is written.

$('#filters a').click(function (event) {
    event.preventDefault();   // the link does not navigate
    applyFilter(this.hash);   // handlers further up still run
});

$('#filters a').click(function () {
    return false;             // navigation stopped, and the event stops here
});

The consequence shows up later and somewhere else: a delegated handler bound on a container never fires, so a dropdown stops closing or a click counter stops counting, and nothing in either file suggests they are related. It is also worth knowing that return false in a plain DOM handler assigned to onclick only prevents the default — the double meaning is jQuery’s, not the browser’s. Call preventDefault() unless you have decided you want propagation stopped too.