Let’s say I have many items with click event (all have same element name and possibly same class).
<a>A</a>
<a>B</a>
<a>C</a>
<a>D</a>
then I have method that is triggered on click event. How can I check number of the item that was clicked?
In the example if ‘C’ was clicked then I should get 3 as an answer.
You can use
.prevAll():Or
.index():