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 my script

$('[EMAIL PROTECTED]').keyup(function(e){
                                if (e.target.value != ''){
                                        $.get('/main/search_item/',
                                                {search_item:e.target.value},
                                                function(data){
                                                        $('[EMAIL 
PROTECTED]').html(data);
                                                }
                                        );
                                }
                        });

thanks
james

Reply via email to