Heading one Heading two heading caption Heading three
Pass your index() a selector:
alert($("h3").eq(2).index("h3"));