Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-14 Thread Karl Swedberg
On Sep 14, 2006, at 2:04 PM, Lewis, David wrote:I think that this should be possible by creating a time delay function [setTimeout()] that is started on the mouseover event and cancelling the timer delay function [clearTimeout()] on the mouseout eventI've done just such a thing with jQuery, but in

[jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Daniel Ruiz
Is there any way in jquery to do something like this? if mouseover for 2 seconds then do this, else do nothing Basically the client I have doesnt want to use onclick to open a hidden navigation but they also dont like the mouseover because a user may move over it by accident. What they

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Paul Bakaus
Hi there,well you have the function hover() and you can use it like this:$(#link).hover(function() {//Will be executed when you mouse over//Set a timer that will wait for 2 secswindow.setTimeout (function() {$(#navigation).show(); //Show navi), 2000);},function() {//Will be executed when you move

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Klaus Hartl
Paul Bakaus schrieb: Hi there, well you have the function hover() and you can use it like this: $(#link).hover(function() { //Will be executed when you mouse over //Set a timer that will wait for 2 secs window.setTimeout (function() { $(#navigation).show(); //Show navi ), 2000); },

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Yehuda Katz
The code John posted regarding Form.observer is a good step in the right direction. I made some tweaks: $.fn.observe = function( time, callback ){ return this.each(function(){ var form = this, change = false; $(form.elements).keyup(function(){ change = true; }); setInterval(function(){ if (

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Christof Donat
Hi, I guess he needs something like this: $(#link).hover(function() { $(#navigation).each(function(){this.donthide = true;}) this.timeout = window.setTimeout(function() {$(#navigation).show();},2000); }, function() { // if we move out of the link before the timout has