indexByTagname Find the index for an element based on it's tagname. Usage $('div').indexByTagName(); Example http://jsfiddle.net/nnumV/