How to trap “open in a new tab” clicks in jquery.click

后端 未结 3 933
南方客
南方客 2021-02-10 08:47

I have a jquery script that attaches a click event to every link, running an action when the link is clicked. This has been working great, but I just got some betatester feedbac

3条回答
  •  误落风尘
    2021-02-10 09:19

    I've seen jquery.rightclick.js code in firebug. There are modifiers with the mousedown and mouseup event like:

    altKey ctrlKey

    so you can use these two modifiers:

    if(evt.altKey || evt.ctrKey)

    in jquery.rightclick.js

提交回复
热议问题