for DOM part, I didn't understand your question. However, the right way to do it is
$(DOMelement:eq(i)).each();
for DOM part, I didn't understand your question. However, the right way to do it is
to iterate through each element.