I think I need to use jQuery's index() function but I'm doing it all wrong! I have a bunch of table cells with images inside, and one of them will have a class called "current". How can I tell which image has the class? I need an integer to work with.
I'm thinking something like this but I get "-1", nothing found..
var prev = $('#full_width_gallery').index('img');
Any ideas where I'm going wrong?
$('img.current')?