A reader asked me to post a simple usage example of my jQuery delayed observer,
so here it is:
$(document).ready(function(){
$('input#adder').delayedObserver(0.5, function(value, object) {
$('input#result').val() = value * 5;
}
});
In this example the input with the id "result" will be updated by the value of the input with the id "adder" multiplied by 5 upon key up with a delay of 0.5 seconds.
A delayed observer can be useful in many cases, so far I've used it in two contexts:
no comments :|