|
DelayedObserver
jquery.delayedobserver.js
A delayed observer, useful for handling user inputs to avoid calling the callback function too often. Autocomplete fields is a common situation where this mechanism is useful. You must post pone the AJAX call until the user stops typing to prevent fast typers to fire too much requests to the server and most likely hang the browser. Example<input type="text" id="autocomplete" /> $('#autocomplete').delayedObserver(function(value, autocompleteObject) {
// AJAX call
});Tested browsers
|
Sign in to add a comment
can you please provide an example more clear? i can't get it working it returns $obj.data("callback").apply is not a function
where am I wrong?
thanks!
The parameters are backwards... should be callback then delay...
@andrew.flanagan:
Sorry I forgot to update this doc for a while, it's fixed.