Skip to content

24 ways to impress your friends

Vote down?

Vladimir Andrijevikj

Another way to avoid the page jump without breaking right-click, Shift-click, and other clicks, is written up at http://mislav.net/2011/03/click-hijack/

Instead of the remove-and-return-id technique above, this technique checks whether we are dealing with a left click in the click handler, and only then does it override the default behavior (returning false, and avoiding the jump). For all other clicks, it falls back to the browser default.