if( $('span.countdown').length ){ updateCounter(); }
-- Ariel Flesler http://flesler.blogspot.com On 23 ינואר, 11:39, johannesf <johannes.foss...@gmail.com> wrote: > Hi > > jquery is fantastic :-) > > My problem: I have a simple each-loop and after the loop I want to run a > js-function. > > How can I determine when the each-loop is done in a more elegant way then > this! > > ------------------------------------------------------------------------- > > var flag = false; > > $('span.countdown').each(function(){ > > flag = true; > > }); > > // when the loop is done, run 'updateCounter()' > if(flag == true){ > > updateCounter(); > > } > > all the best / johannes > > -- > View this message in > context:http://www.nabble.com/run-function-when-%27each%27-is-done%2C-how--tp... > Sent from the jQuery General Discussion mailing list archive at Nabble.com.