I have an anchor tag that calls a JavaScript function.
With or without JQuery how do I determine if the shift key is down while the link is clicked?
The foll
For checking if the shiftkey is pressed while clicking with the mouse, there is an exact property in the click event object: shiftKey (and also for ctrl and alt and meta key): https://www.w3schools.com/jsref/event_shiftkey.asp
So using jQuery:
$('#anchor').on('click', function (e) {
if (e.shiftKey) {
// your code
}
});