I have this HTML code right here..
<ul>
<li><a href="#" id="0">Services</a></li>
<li><a href="#" id="1">Portfolio</a></li>
<li><a href="#" id="2">Contact</a></li>
</ul>
And I have this JavaScript over here when you click on one of the links:
alert(this.id);
Question: is it possible to determine which "A" tag was clicked, without setting extra "id" attribute for links? With JavaScript it would be like this:
document.getElementsByTagName("a")[number];
And I need that number from "this".
I hope you understand what I meant. Sorry for my english.