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://
jsbin.com/iyegu/) for a sample... the timeout is something required to
simulate a real double click.

Thanks for sharing your thoughts :)

On Dec 1, 6:36 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> 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;
>         } else {
>                 totalClicks++;
>         }
>
>
>
> });
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of TheBlueSky
> Sent: Saturday, November 29, 2008 6:21 AM
> To: jQuery (English)
> Subject: [jQuery] Double right-click, anyone?
>
> Hi everyone,
> Does anyone has code, implementation, plug-in or whatever to detect double
> right-click? I'm searching and trying for couple of days now without any
> result.
> Appreciate any help.- Hide quoted text -
>
> - Show quoted text -

Reply via email to