Could someone tell me the difference bet开发者_运维知识库ween those two. The first one is working on FF and not in IE (6) and second one is working in IE (6) and not in FF (I am using the Jquery 1.4.2). We had to detect the browser and write the script accordingly.
One has a descendant selector in the middle of it.
span:first
Will select "All span elements that the :first pseudo-class applies to"
span :first
Will select "All elements which have the :first pseudo-class applied to them AND which are descended from a span element"
There isn't actually a :first pseudo-class though. You might mean :first-child, :first-line or :first letter.
(Oh, :first
is some jQuery specific stuff, that explains why SelectOracle didn't know about it)
精彩评论