Welcome Guest, Not a member yet? Register   Sign In
iterate through array for jQuery animations?.

I am trying to do successive animations based on the contents of an array. Here is what i thought it should have been;
arr = [ "First", "Second", "Third", "Forth" ];
for(index in arr){
    $('#fade').fadeOut(2000, function(){
However this fades straight to 'fourth', presumably because it iterates through the array without waiting for the animations. What should i be doing instead?

Theme © iAndrew 2016 - Forum software by © MyBB