| queing jQueryUI effect()
|
sssweb

msg:4531522 | 6:44 pm on Dec 27, 2012 (gmt 0) | I have a jQueryUI effect() animation that I want to repeat several times with a delay between each. When I simply chain them: $("#id").effect("highlight").delay(1000).effect("highlight"); there's no delay between them (not sure why). So I'm trying to use .queue() but it's new to me and I can't get the code right. What's the easiest way to do this?
|
sssweb

msg:4531713 | 1:56 pm on Dec 28, 2012 (gmt 0) | Okay -- I worked this out through trial & error, though I can't say I fully understand how it works; this is for 3 repetitions: $("#id).effect("highlight"); $("#id").queue( function() { $(this).delay(1000).effect("highlight").dequeue(); $("#id").queue( function() { $(this).delay(1000).effect("highlight").dequeue(); }); });
|
|
|