jQuery each instead of for loop