> Thanks for your help, but this doesn't change anything, 
> still both functions are executed... any other ideas?

Click always happens before double-click. If you don't want it that way,
you'll need to setTimeout in click to see if a double-click arrives, then
cancel the timer if it does. That has the undesirable side effect of
delaying the click effect until you are sure that no double-click happens,
and the double-click time is user settable (e.g., Control Panel, Mouse in
Windows) so there is no totally safe value that isn't also annoying.

Untested:

var dctimer = 0;

var myClickFunction =  function()
{
  var self = this;
  dctimer = setTimeout(function(){$(self).toggleClass("backcolor2")}, 500);
}

var myDblClickFunction =  function()
{
  clearTimeout(dctimer); dctimer=0;
  alert('DoubleClick');
}


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to