Skip to content
Advertisement

prevent link click event except open in new window hotkey is pressed

So I have my website, a website without reload between site switches. For SEO reasons, my links look like this:

JavaScript

myHandler is the site handler in this case.

If I click the hotkey for opening a link in a new tab (on Mac it is CMD+Click), it does not work, as the event is prevented.

How to check if the link should open in a new tab or not? (Check if the hotkey is pressed or not)

Advertisement

Answer

Not sure I understood it, but try this

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement