The detail property on the event object will help you out here. On the first click it's 1, on each subsequent click in the same spot it goes up one. For the second click as well as on the double click, it will be 2.
$("#foo").click(function(ev) { if (ev.detail == 1) { //single click -- perform click action } }).dblclick(function(ev) { //double click -- perform double click action }); Ref: http://developer.mozilla.org/en/docs/DOM:event.detail - Richard Richard D. Worth http://rdworth.org/ On Tue, Jun 10, 2008 at 9:57 AM, LeonL <[EMAIL PROTECTED]> wrote: > > > > I'm having the same problem. > Can anybody help please?? > Thanks! > > > Stefan Kilp [sk-software] wrote: > > > > > > Hi, > > > > > > i am using jscript-1.1 > > > > > > i have registered click and dbclick event on the same tag > > > > > > $("#liste p").dblclick(function(){ > > ... > > } > > $("#liste p").click(function(){ > > ... > > } > > > > > > so that i have different bahavior on click and doubleclick. > > > > > > click works fine > > when i doubleclick the item then doubleclick gets execute, BUT click gets > > executed twice > > BEFORE. i wanted to execute dblclick or click, not both. > > > > > > what am i doing wrong. > > > > > > thanks > > stefan > > -- > > Stefan Kilp > > SK-Software, Entwicklung & Beratung > > > > > > email: [EMAIL PROTECTED] > > > > > > fon  : +49 6151 93344-0 > > fax  : +49 6151 93344-20 > > Herta-Mansbacher-Str. 98 > > 64289 Darmstadt, Germany. > > ----------------------------------------------------- > > > > > > > > > > > > _______________________________________________ > > jQuery mailing list > > [EMAIL PROTECTED] > > http://jquery.com/discuss/ > > > > > > -- > View this message in context: > http://www.nabble.com/click---dblclick-Problem-tp8389800s27240p17756125.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > >