I have a few divs:
<div class="somediv">text</div>
<div class="somediv">text</div>
<div class="somediv">text</div>
<div class="somediv">text</div>
And when I click on for example the third div, I want to return the number 3.
I have tried something like this but it didn't work:
console.log($("this").index);