I found this routine as it was what I needed and it works perfectly.
var onFooEndFunc = function() {
var delay = 50; /* milliseconds - vary as desired */
var executionTimer;
return function() {
if (executionTimer) {
clearTimeout(executionTimer);
}
executionTimer = setTimeout(function() {
// YOUR CODE HERE
}, delay);
};
}();
I hope you all find this useful too.
No comments:
Post a Comment