[jQuery] Which element is selected
If I am binding all the "dt" tags in a "dl" list is it possible to
track which number (position in the selection array) I have clicked
on?
For example:
$('#faqlist dt').bind('click',function(){
$(this).addClass('dtSelected');
var a = $(this).next();
currfaq = HERE // I'd LIKE TO TRACK THE ELEMENT CLICKED ON
a.slideDown();
});
I know I can get the id of the matched element or use metadata to
track info, but I'd like to know if it was say the 3rd matched element
in the selection array.
Thanks