Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > jQuery Selectors Quiz - Test Your Knowledge

Reply
Thread Tools

jQuery Selectors Quiz - Test Your Knowledge

 
 
Garrett Smith
Guest
Posts: n/a
 
      06-01-2010
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

Garrett
 
Reply With Quote
 
 
 
 
nick
Guest
Posts: n/a
 
      06-01-2010
On Jun 1, 5:48*pm, Andrew Poulos <(E-Mail Removed)> wrote:
>
> Service Temporarily Unavailable


It's back.
 
Reply With Quote
 
 
 
 
Garrett Smith
Guest
Posts: n/a
 
      06-01-2010
On 6/1/2010 2:48 PM, Andrew Poulos wrote:
> On 2/06/2010 7:34 AM, Garrett Smith wrote:


[...]
>> http://dhtmlkitchen.com/jstest/jquery/quiz.jsp
>>
>> Garrett

>
> The URL gives
>
>
> Service Temporarily Unavailable
>


Try it again.

I'm working out issues with the configuration of Tomcat where JSPs are
not reloaded.
 
Reply With Quote
 
nick
Guest
Posts: n/a
 
      06-01-2010
On Jun 1, 5:34*pm, Garrett Smith <(E-Mail Removed)> wrote:
>
> 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.


Got some issues with the scoring...

"Good job! After just 1 try, you got all 10 questions right!"

...but I only got two right (7 and 9). Now I'm really curious what the
right answers were? I'm guessing the non-strings are allowed, and the
image inputs are getting treated as img tags or vice versa?
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      06-01-2010
On Jun 1, 5:52*pm, Garrett Smith <(E-Mail Removed)> wrote:
> On 6/1/2010 2:48 PM, Andrew Poulos wrote:
>
> > On 2/06/2010 7:34 AM, Garrett Smith wrote:

>
> [...]
>
> >>http://dhtmlkitchen.com/jstest/jquery/quiz.jsp

>
> >> Garrett

>
> > The URL gives

>
> > Service Temporarily Unavailable

>
> Try it again.
>
> I'm working out issues with the configuration of Tomcat where JSPs are
> not reloaded.


You might want to work on the tallying as well. It counts about as
well as jQuery (and the rest of them, most of which are now
"standardizing" on jQuery's engine).

http://www.cinsoft.net/slickspeed.html

Oh, the humanity!

Took me three fairly disinterested tries to get them all (first after
misreading the instructions) and that goes to show the futility of
trying to predict even one version of jQuery (the latest in this case)
across multiple browsers (particularly if attribute-related queries
are involved).

The presence of QSA and non-QSA enabled browsers, as well as broken
MSHTML implementations would make for some long-winded explanations of
the results. Life's too short, so one should just realize that jQuery
is god-awful at the one thing it is supposedly proficient at and dump
it.

The retorts from jQuery-land (assuming they are even paying attention)
will range from:-

1. Nobody's perfect.
2. jQuery rulez d00d!!!!!!
3. Those are all "edge cases".
4. You're just trying to break it.
5. Where's your cool query engine?
6. Aw, UR just jealous coz nobody uses your query engine.
7. They'll get it eventually!
 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      06-01-2010
On Jun 2, 7:34 am, Garrett Smith <(E-Mail Removed)> 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..."

it should say:

"...making "b" correct...".

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. "

But that would make "d" the correct choice, not "e". I think more work
is needed.

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.


--
Rob
 
Reply With Quote
 
Garrett Smith
Guest
Posts: n/a
 
      06-02-2010
On 6/1/2010 4:28 PM, RobG wrote:
> On Jun 2, 7:34 am, Garrett Smith<(E-Mail Removed)> 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?
 
Reply With Quote
 
Garrett Smith
Guest
Posts: n/a
 
      06-02-2010
On 6/1/2010 6:14 PM, Garrett Smith wrote:
> On 6/1/2010 4:28 PM, RobG wrote:
>> On Jun 2, 7:34 am, Garrett Smith<(E-Mail Removed)> wrote:
>>> Test your jQuery selectors knowledge with the jQuery Quiz!
>>>


[...]

>
> "e" would be the most correct answer because it does not include
>

Strike that.
 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      06-02-2010
On Jun 2, 11:14*am, Garrett Smith <(E-Mail Removed)> wrote:
> On 6/1/2010 4:28 PM, RobG wrote:

[...]
> > 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.


I wonder whether it might be better to just state the expected
(technically correct) result, then the actual (jQuery) result and why
jQuery fails on the first attempt regardless of which answers are
given. Requiring visitors to "pass" the test to get to the interesting
part may distract from the valuable point being made.


--
Rob
 
Reply With Quote
 
Joe Nine
Guest
Posts: n/a
 
      06-02-2010
David Mark wrote:
> The presence of QSA and non-QSA enabled browsers, as well as broken


What's this QSA I see mentioned occasionally here? Google was no help
http://www.google.com/search?q=qsa
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft expanding it use of jQuery & involvement with jQuery lorlarz Javascript 6 03-25-2010 10:14 PM
jQuery Query about comparing jQuery references Aaron Gray Javascript 20 07-27-2008 01:53 PM
Enhance your knowledge and boost your mind cutebravo Computer Support 2 06-06-2007 05:35 PM
Enhance your knowledge and boost your mind cutebravo C++ 2 06-06-2007 12:53 PM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM



Advertisments