[jQuery] Re: How to specify a delay with bind?

2009-04-03 Thread wjp
That works great thanks James. Exactly what I needed. On Apr 2, 8:15 pm, James james.gp@gmail.com wrote: Something like (untested): var myTimeout = null; $('#myDiv').bind(mouseleave, function() {     myTimeout = window.setTimeout(function() {          $(#myDiv).slideUp(450);     },

[jQuery] Re: How to specify a delay with bind?

2009-04-02 Thread James
Something like (untested): var myTimeout = null; $('#myDiv').bind(mouseleave, function() { myTimeout = window.setTimeout(function() { $(#myDiv).slideUp(450); }, 1000); // -- 1000ms }); $('#myDiv').bind(mouseenter,function() { window.clearTimeout(myTimeout); }); When you

[jQuery] Re: How to specify a delay with bind?

2009-04-02 Thread Ricardo
There's a plugin called hoverIntent that deals with this exact issue: http://cherne.net/brian/resources/jquery.hoverIntent.html - ricardo On Apr 2, 9:59 am, wjp waynep...@gmail.com wrote: Hi, I have something like: $('#myDiv').bind(mouseleave,function() {     $('#myDiv).slideUp(450); })