The title sounds off. Ok, here's what I've got. I'm detecting keyboard input from the INPUT box in the event sheet. So it looks something like this:
On Text Change -> Wait for 1 sec and do my action here...
This isn't what I'm looking for of course as every time I input a key and thus, a text change is detected, it fires accordingly. So if I type up "hello" quickly, it'll run the action 5 times (there are 5 letters).
So I'm looking for a way to detect changes on the text box but only fire my action once given a certain time period where no more changes are detected. So if I type up "hello" quickly, it'll fire the action only 1 time. So in JS, it's something like this:
var timer;
var interval = 3000; // Delay in ms before the action will run
$('#inputbox').keyup(function(e) {
if (timer)
clearTimeout(timer);
timer = setTimeout(action, interval);
});
function action() {
//My actions here
}
[/code:9lualxyu]
Is there something of a rough equivalent to this that anyone knows about?