On 6/1/2010 4:28 PM, RobG wrote:
> On Jun 2, 7:34 am, Garrett Smith<dhtmlkitc...@gmail.com> wrote:
>> Test your jQuery selectors knowledge with the jQuery Quiz!
>>
>> 10 questions long.
>>
>> Read the instructions carefully and how many tries it takes you to get
>> it right.
>>
>> When you've successfully answered all 10 questions correctly, you'll get
>> to see the demo of them in action, linked from the bottom of the quiz.
>>
>> http://dhtmlkitchen.com/jstest/jquery/quiz.jsp
>
> The explanation for the sample error is wrong, where it says:
>
> "In Firefox 3.6, nothing will happen, making "c" correct..."
>
Yes, I know and that has been fixed. Thanks.
The example question was changed to include a third correct answer,
introducing a mistake in the process. I fixed that but the change was
not picked up by Tomcat. I had to leave, and could not fix it at that time.
> I kept trying until #10 was marked correct - apparently "e" is the
> answer. The explanation:
>
> "Result is 1 in Firefox 3.6, IE8, Safari 4, Opera 10, IE8 (standards),
> and Chrome; and 0 in IE6 and IE7 (either mode), and IE8 in quirks
> mode. "
>
That explanation is right and "d" is the most correct answer. I've fixed
the test.
The trick is that jQuery does not support the universal selector and so
when that is used, then the other imgs won't be matched, resulting in 0
0 is a wrong answer, which is unintersting; how jQuery gets that wrong
answer is.
Unquoted, $("html > body input[width=600]").length results
`4` in any version of IE in quirks mode (IE6 and above; IE5.5 just
throws errors with jQuery).
`1` in Firefox 3.6.
`0` in IE6 and IE7 in standards mode.
SO, unquoted, the answer would have been e.
> But that would make "d" the correct choice, not "e". I think more work
> is needed.
>
"e" would be the most correct answer because it does not include
> If the intention is to point out inconsistencies in the Sizzle
> selector engine, you're at risk of failing because of simple errors
> that affect the credibility of the exercise.
>
Indubitably stupefied by my own quiz and point taken.
Valuable feedback. Thanks, Rob.
Anyone else find this stuff confusing, BTW?