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
Now
buttonhas been fouled up beyond all recognition. According to W3C its values should be:
- Left button – 0
- Middle button – 1
- Right button – 2
According to Microsoft its values should be:
- Left button – 1
- Middle button – 4
- Right button – 2
No doubt the Microsoft model is better than W3C’s. 0 should mean “no button pressed”, anything else is illogical.
From http://www.quirksmode.org/js/events_properties.html