I’m coding a simple script to extract database informations on input keyup event.
The problem i have is that the keyup event is always repeated everytime the user press a key. How can i make it working only after the last key pressed?
I think i should use a function like setTimeOut() after every keyup, But i don’t know how… can you make me a simple example please?
Sorry for my bad english 🙂
Here is what i was trying to do:
$("input").keyup(function()
{
var timer=setTimeout(function() {
}, 1000);
if(!timer)
{
//do .post ajax request
}
});
1 Answer