I have a list with a tags to play some mp3 files onclick. It is working fine when binding on the 'click' event with jQuery:
$oo.data({'__mp3play':true,'wapiHandle':h+0,'wapiIndex':o.ajaxPlayList[h].length})
.bind( 'click', function()
{ var wh = $j(this).data('wapiHandle');
if( typeof o.regObjects[wh] == 'object' && o.regObjects[wh].play(this.href))
{ return false; }
});
When clicking the left mouse button: It disables default handling when my flash plugin is loaded otherwise it will be opened normally.
BUT: When I use the scrollbutton of the mouse and click on it, the click event will not fired and the link opens normally.
I have tried to use mousedown or mouseup events but doesn't help, the link always opens normally with the side effect that the music starts playing also with the flash player.
Also preventDefault()
does not work at all.
Can somebody tell me how to detect the middle mouse button click (scroll button click)?
Thank you for your comments.
PS: I have already tried other solutions about the 'middle button' available on this site.
Tested in all kind of browsers with the same result.
EDIT: This also does not work, the link will be opened normally when using the middle mouse button. When using the left mouse button, nothing happen.
$oo.bind( 'mousedown click mouseup', function(e)
{ e.preventDefault(); e.stopPropagation(); return false; });