I have a cycle that it's just working for my last element. It was suposed to work for each element.
for (var z=1; z<$('.page').length;z++){
$('#arrowUp_'+z).click(function(){
$('#thumbsContainer_'+z).animate({top: '-='+93+'px'}, {duration: 1000});
cont++;
arrowThumbs();
});
$('#arrowDown_'+z).click(function(){
$('#thumbsContainer_'+z).animate({top: '+='+93+'px'}, {duration: 1000});
cont--;
arrowThumbs();
});
}
If I replace z for one number I can make it working for that case. But I don´t want to repeat the same process N time. So I thought it was good idea to make a a cycle for...but no success
Can anyone explain how to do that?? Thanks