[jQuery] Re: how to delay a event?

2007-08-23 Thread Klaus Hartl
Klaus Hartl wrote: var delayed; $('[EMAIL PROTECTED]').keyup(function() { clearTimeout(delayed); var value = this.value; if (value) { delayed = setTimeout(function() { $.get('/main/search_item/', { search_item: value }, function(data) { $('#searc

[jQuery] Re: how to delay a event?

2007-08-23 Thread Klaus Hartl
james_027 wrote: hi, I have a small jQuery script, that get some data over the server on every keypress by the user, but I don't to perform such action every time when the user presses a key, specially if between key presses happens in short amount of time. How do I delay this event? Here is m

[jQuery] Re: how to delay a event?

2007-08-23 Thread Erik Beeson
Check out my response to this question when it came up back in March: http://www.mail-archive.com/[EMAIL PROTECTED]/msg18931.html Hope it helps. --Erik On 8/22/07, james_027 <[EMAIL PROTECTED]> wrote: > > hi, > > I have a small jQuery script, that get some data over the server on > every keyp

[jQuery] Re: how to delay a event?

2007-08-23 Thread David Duymelinck
I think he wants to delay the keyup event but i don't think you can't delay that because it's the trigger for the actions. -- David Ganeshji Marwaha schreef: sorry, am i missing something. -GTG On 8/22/07, *james_027* <[EMAIL PROTECTED] > wrote: Hi,

[jQuery] Re: how to delay a event?

2007-08-23 Thread Ganeshji Marwaha
sorry, am i missing something. -GTG On 8/22/07, james_027 <[EMAIL PROTECTED]> wrote: > > > Hi, > > On Aug 23, 2:34 pm, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > > are u trying to achieve something like autocomplete (like google > suggest), > > if that is the case, then you should look > at

[jQuery] Re: how to delay a event?

2007-08-22 Thread james_027
Hi, On Aug 23, 2:34 pm, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > are u trying to achieve something like autocomplete (like google suggest), > if that is the case, then you should look > athttp://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ > > -GTG > No I am doing a auto com

[jQuery] Re: how to delay a event?

2007-08-22 Thread Ganeshji Marwaha
are u trying to achieve something like autocomplete (like google suggest), if that is the case, then you should look at http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ -GTG On 8/22/07, james_027 <[EMAIL PROTECTED]> wrote: > > > hi, > > I have a small jQuery script, that get some