I'm trying to put together a live search input for an internal app I'm
working on and I can't seem to figure out how to delay the ajax call to only
fire if the user hasn't typed a character for half a second or so. That
way, the request isn't firing after every character is entered as the user
is typing.
Here is what I'm using, but I would like to build in some functionality
$('#search').bind('keyup',function() {
str = $('#search').val();
if(str.length >= 3){
$.ajax(.....)
}
}
Thanks for the help.....
Cheers, David
--
View this message in context:
http://www.nabble.com/Delay-on-keypress-tf3412467.html#a9508255
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/