[jquery-dev] Re: suggestion: delayed related AJAX requests

2009-03-28 Thread oliver
I agree that this is a common use case, and also that it would be better implemented as an optional parameter to ajax rather than a wholly separate method. I find I also use similar code within animations, so perhaps the code could be implemented in such a way as to also be exposed as a utility

[jquery-dev] Re: suggestion: delayed related AJAX requests

2009-03-28 Thread oliver
Quick passes: jQuery.delay = function(callback, delay) { var timeout; return function() { clearTimeout(timeout); timeout = setTimeout(callback, delay); } } jQuery.throttle = function(callback, delay) { var prev = new

[jquery-dev] Re: suggestion: delayed related AJAX requests

2009-03-27 Thread Daniel Friesen
Rather than an entire other function, what about just a {delay: ms} to .ajax ~Daniel Friesen (Dantman, Nadir-Seen-Fire) Miloš Rašić wrote: Here's a suggestion for a feature that I think would be useful to AJAX developers. Sometimes, we need an AJAX feature that could allow a user to cause a