jQuery .eq(x) returns different element in IE than in FF/Chrome
Posted
by bt
on Stack Overflow
See other posts from Stack Overflow
or by bt
Published on 2010-03-09T07:32:45Z
Indexed on
2010/03/09
7:36 UTC
Read the original article
Hit count: 148
I am using the .eq() method to select a specific child element of a known element. It appears that the element indices are different in IE and in Chrome/FF, as .eq(2) returns different values depending on browser. (The element I'm looking for shows up as .eq(2) in FF/Chrome, but .eq(3) in IE)
For example,
alert($(this).parent().children().eq(2).text());
shows different results depending on the browser.
Is there a better way of doing this?
© Stack Overflow or respective owner