> Now, my mark-up is wrong.  I should have wrapped the nested 
> <ul> in it's own <li>, but I missed it.  Testing looked good 
> in FF 2, .next() was returning the nested <ul>, and I didn't 
> even notice the problem.  In IE6/7 however,
> .next() returned the next <li>, and not the <ul> which was in 
> fact next the next element.  Wrapping the <ul> in it's own 
> <li></li> as it should be solved the discrepancy, but the 
> fact that there is a discrepancy in how the two browsers 
> interpret .next() makes me think perhaps there's a bug in there.
> 
> My understanding of sibling was the next element in line on 
> the same level, but in the case of the mark-up above IE seems 
> to interpret the next sibling as the next element in line on 
> the same level and of the same type.  Am I wrong in my 
> understanding of sibling?

When you have invalid markup, browsers take their best guess as to what you
meant, and different browsers may guess differently.

If you're interested in knowing exactly what happened here, use a DOM
inspector in each browser and compare the DOM trees. For Firefox, that would
be Firebug, and for IE, Microsoft's Developer Toolbar:

http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-
bb3e-2d5e1db91038

My guess is that there are differences in the DOM that explain the different
results.

-Mike


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to