I need some help in this code block:
options.imgs.click(function() {
var allImgs = $("#big img");
$("#big img").each(function(n) {
this.index = n;
})
animateImage(allImgs);
})
};
function animateImage(images) {
for(var i = 0; i < images.length; i++) {
if (images[i].index == 0) {
alert($(this).index)
}
}
}
My problem is:
$(this).effect('scale', { percent: 200 }, 1000)
Isn't working. I want that statement to refer to the image with the index of 0, and scale it 200%. But $(this)
isn't referring to the first image at all.