I have a link that, in order to optimize the page response / traffic, I process the event clickusing a javascript handler click. On clickI load only part of the page. But the link url is correct and opening it on a separate tab will open the page correctly.
But when the user clicks the CMD-Click link (to open the link in a new tab), the handler runs click, and the page is NOT open in a new tab. Basically, I disabled CMD-Click functionality (open in a new tab). How can I detect this in code to make CMD-Click work as expected. (On Windows, CMD is replaced by Ctrl.)?
$(".link").on("click", function(event) {
if () {
return true;
}
})
Should I write OS / browser code for the solution TODOabove? (I am using jQuery)
source
share