var thumbs = document.getElementsByTagName("img");
for (var i=0; i<thumbs.length; i++)
{
Core.addEventListener(thumbs[i], "click", function() {alert(i);});
}
In the above code, the alert always shows18. that is the number of image thumbnails. i want it to show which thumbnail i clicked. why isnt it showing that? also i need to pass that value of the clicked thumbnail forward to another function so that i can display the subsequent full image too. can anyone pls help?
also if there is any better way to do this, pls suggest. thanks a lot in advance.