This is my list..
<li class="haftalar"><a value="7" class="click" href="#" title="7. Hafta Maç Özetleri">7. Hafta</a></li>
<li class="haftalar"><a value="8" class="click" href="#" title="8. Hafta Maç Özetleri">8. Hafta</a></li>
I want to get index as clicked li element’s and class equaled to “haftalar”.
I’m using this code but I can’t get my want.
$(".click").toggle(function(){
index = $(this).index();
}
Example –
Demo – http://jsfiddle.net/ptC7t/1/