freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

Typo in the instructions of jQuery exercise

Open diegomm77 opened this issue 11 years ago • 7 comments

http://freecodecamp.com/challenges/waypoint-target-a-specific-child-of-an-element-using-jquery

In the instructions is says: $(".target:nth-child(3)").addClass("animated bounce");

and it should be: $(".target :nth-child(3)").addClass("animated bounce");

i.e., with a space before the semicolon. Otherwise it doesn't work.

diegomm77 avatar Aug 17 '15 20:08 diegomm77

Thanks @diegomm77 would not have completed this challenge without this update.

iisupreme avatar Aug 18 '15 02:08 iisupreme

I am not having this problem at all, and the official jQuery example isn't using a space before the colon. Are you sure it's not just a broken test case or something?

ahstro avatar Aug 18 '15 16:08 ahstro

I guess it may be a wrong test case.

diegomm77 avatar Aug 18 '15 16:08 diegomm77

The difference is that the space makes it a css descendant selector.

Both

$(".well :nth-child(3)").addClass("animated bounce");

and

$(".target:nth-child(3)").addClass("animated bounce");

mean the same thing, but the wording of the instructions suggest the user to do 1 (IE target the children of the .well) without explaining the descendant selector.

benschenker avatar Aug 18 '15 22:08 benschenker

I'm so glad I searched for help! I had been stuck on this for a while. Why has this typo not been fixed yet?

CodeDragoness avatar Jul 07 '16 20:07 CodeDragoness

This STILL has not been fixed yet

hworth avatar May 24 '17 22:05 hworth

@hworth, if you read @benschenker's comment, they explain what's going on here :)

ahstro avatar May 26 '17 07:05 ahstro