I’m trying to get a location of an element in a jQuery set.
I want to be able to do something like this:
$('ul').find('a').indexOf('.active');
And get the location of the .active in the set of a‘s.
Is there something like an indexOf() function for jQuery? The index() method doesn’t work
if you pass a jQuery set (
$searchFor) as an argument to theindexmethod of another jQuery set ($searchIn) i.e.it will return the index of
$searchForin the set$searchInIn your example: