[jQuery] Re: Double right-click, anyone?

2008-12-02 Thread TheBlueSky
Yes, you're right; there is no default event handler for double right- click. The code you introduced won't really simulate the double click; it will consider any two right-clicks a double click, which is not the wanted behaviour. Refer to the code above shared by Ricardo (http://

[jQuery] Re: Double right-click, anyone?

2008-12-01 Thread TheBlueSky
Thanks for the latest code, it seems it's working fine, but I only tried your example and didn't port it to my page. I tested it on IE and FF and both were ok. In Opera I was receiving the evente after changing some setting, but the context menu is still there. Anyway, thanks again :) On Nov

[jQuery] Re: Double right-click, anyone?

2008-12-01 Thread TheBlueSky
PROTECTED] On Behalf Of ricardobeat Sent: Sunday, November 30, 2008 9:24 AM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? I didn't test it in IE... no cookie. Apparently the 'mousedown' event was at random not carrying the property that tells us what button was clicked

[jQuery] Re: Double right-click, anyone?

2008-12-01 Thread TheBlueSky
is interpreted as button 2? JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ricardobeat Sent: Sunday, November 30, 2008 6:31 PM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? returning false from

[jQuery] Re: Double right-click, anyone?

2008-12-01 Thread Andy Matthews
I don't think there's a default double right click event handler, but this wouldn't be that hard to write. Psuedo code --- $('#someElement').rightclick(function(){ totalClicks = 0; if (totalClicks == 2) { // do some stuff totalClicks = 0;

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread TheBlueSky
Thanks for the code... but I couldn't manage to make it work at all in IE and in FF the only time it worked is if I replaced $('body') with $ ('html)! Any idea how to make it work with a specific element; e.g. and image with id=myImage, because when I tried $('#myImage') it didn't work as well.

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread TheBlueSky
I forgot to mention also that I disabled the context menu with the code $('html').bind(contextmenu, function(e) {return false;}); and if I didn't do that, the context menu will appear and every right- click then will fire the double-click event in IE. I guess that's because in IE the

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread ricardobeat
I didn't test it in IE... no cookie. Apparently the 'mousedown' event was at random not carrying the property that tells us what button was clicked, a triple click was needed. I switched to mouseup and it seems to work fine, I also had forgotten to clear the timeout and set the var to false when

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread Jeffrey Kretz
Of ricardobeat Sent: Sunday, November 30, 2008 9:24 AM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? I didn't test it in IE... no cookie. Apparently the 'mousedown' event was at random not carrying the property that tells us what button was clicked, a triple click was needed. I

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread ricardobeat
: Sunday, November 30, 2008 9:24 AM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? I didn't test it in IE... no cookie. Apparently the 'mousedown' event was at random not carrying the property that tells us what button was clicked, a triple click was needed. I switched

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread Jeffrey Kretz
is interpreted as button 2? JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ricardobeat Sent: Sunday, November 30, 2008 6:31 PM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? returning false from the handler should

[jQuery] Re: Double right-click, anyone?

2008-11-30 Thread seasoup
PROTECTED] On Behalf Of ricardobeat Sent: Sunday, November 30, 2008 9:24 AM To: jQuery (English) Subject: [jQuery] Re: Double right-click, anyone? I didn't test it in IE... no cookie. Apparently the 'mousedown' event was at random not carrying the property that tells us what button

[jQuery] Re: Double right-click, anyone?

2008-11-29 Thread ricardobeat
A quick implementation: $('body').unbind('mousedown').mousedown(function(e){ var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); var t = $(this); if (rightclick) { console.log('rightclick'); if (t.data('rightclicked')) {