<div> <h3>Heading one</h3> <h3>Heading two</h3> <h4>heading caption</h4> <h3>Heading three</h3> </div>
I want to get the position of an element inside jQuery, not the index in the DOM.
At the moment, if I alert($("h3").eq(2).index()); I will get a '3' - I want a "2".
http://jsfiddle.net/4QmEF/
ahren source share