I\'m currently designing a simple forum application. It\'s mostly powered by jQuery/AJAX and loads everything on the same page; however, I know that sometimes users want to
You need to also consider that ctrl-click and cmd-click are used to open new tabs (in windows/linux and mac respectively. Therefore, this would be a more complete solution:
jQuery.isClickEventRequestingNewTab = function(clickEvent) {
return clickEvent.metaKey || clickEvent.ctrlKey || clickEvent.which === 2;
};