I have a group of images with thumb class. In the click event, I want to know which image the user clicked from the thumbs array of images. Basically, I want the index of (this) image in thumbs array.
HTML
<img class="thumb" src="#" />
<img class="thumb" src="#" />
<img class="thumb" src="#" />
<img class="thumb" src="#" />
Javascript
var thumbs = $('.thumb');
$('.thumb').click(function(){
current_thumb = ??;
});