Very briefly –
jQuery filter lets you filter through a list of jQuery objects. It also takes in a jQuery object as a parameter which is really cool.
Now, say I have a list of elements x – [div1, div2, div3, div4] and I have a jQuery object y which refers to div4.
I can get div4 out of said list by simply using x.filter(y) but is there a simple way to get the index of y in x?
try the
.index()method