i need a non Jquery middleclick solution for all new browser.
My idea was to use the onmiddleclick … but this code does not work.
Hope someone can help.
HTML / JS Code
<div id="test" onmiddleclick="alert('middle');" ondblclick="alert('dbl');" >
CLICK HERE
</div>
Example
http://jsfiddle.net/392BK/
Thanks in advance!
Peter
Javascript:
HTML:
Have a read of this QuirksMode page for more information on event properties.
If possible, it’s definitely worth using jQuery for things like this. Cross-browser compatibility for mouse-clicks is poor, and you’ll need something more like this demo to provide support in all browers.