Search Results

Search found 1 results on 1 pages for 'user668499'.

Page 1/1 | 1 

  • jQuery - Call function once at end of each loop

    - by user668499
    How can I call a function once at the end of an each loop. This alerts 'finished' on each loop, I want it once when the loop has finished. $(function(){ var imgArr=[]; var lis = $('#gallery li') lis.each(function(){ imgArr.push(this.outerHTML); $(this).remove(); alertFun(); }) function alertFun(){ alert('finished'); } })

    Read the article

1