If you had 20 images, each with a class of .more, this would tell you which one was clicked on.
1 2 3 4 5 6 7 8 |
$(document).ready(function() { $('.more').click(function() { var index = $(".more").index(this); alert("Panel number is: " + index) }); )}); |