Jquery: detect if middle or right mouse button is clicked, if so, do this:

前端 未结 3 472
终归单人心
终归单人心 2020-11-30 10:39

Check out my jsfiddle demo, if e.which == 1 then when you left click the h2 it will e.which == 2 or e.which == 3 then it wont work. 2

3条回答
  •  广开言路
    2020-11-30 11:01

    I've noticed some oddities in the past with using the click event for anything but a regular left-click. I don't recall the details, but if you change "click" to "mousedown" or "mouseup" you should have better results.

提交回复
热议问题