How to replace the left mouse click, click the middle mouse button (scroll), that is, press the left button but the action is performed as if you click the middle mouse button.
e.preventDefault(); var $link = $(this).find('a'), mouseEventMiddle = new MouseEvent( "click", { "button": 1, "which": 2 }); $link[0].dispatchEvent(mouseEventMiddle); return false;