J
J
joger2011-09-06 12:09:16
JavaScript
joger, 2011-09-06 12:09:16

jQuery UI: callback after multiple show?

For example:

function func1()<br/>
{<br/>
 alert(&quot;a&quot;);<br/>
}<br/>
$(&quot;#div1&quot;).show(&quot;blind&quot;,{},1000,function(){ func1();});<br/>
$(&quot;#div2&quot;).show(&quot;blind&quot;,{},2000,function(){ func1();});<br/>


is it possible to make div1 and div2 have a common callback that is executed "after all".

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sajgak, 2011-09-06
@sajgak

make a variable - a counter, into which the number of performed shows will be recorded, and if the required number is reached, execute the necessary function. Not sure if this is the most elegant option :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question