Stuck on 7/16 Fade in



<Below this line, add a link to the EXACT exercise that you are stuck at.>

I’m sure im stuck on the easiest problem but i can’t seem to figure out why this code wont run.
Even the hint says that my .hide and .fadeIn actions are correct.
please help :slight_smile:

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

Oops! The test returned an error. Maybe you have a syntax error, or a typo. Hide error.
throw err;

SyntaxError: /home/ccuser/workspace/learn-javascript-U5L1/js/main.js: Unexpected token (3:9)
e[0m e[90m 1 | e[39m$(document)e[33m.e[39mready(main)e[33m;e[39m
e[90m 2 | e[39m
e[31me[1m>e[22me[39me[90m 3 | e[39me[36mfunctione[39m () { $(e[32m’.skillset’e[39m)e[33m.e[39mhide()e[33m;e[39m
e[90m | e[39m e[31me[1m^e[22me[39m
e[90m 4 | e[39m$(e[32m’.skillset’e[39m)e[33m.e[39mfadeIn(e[35m1000e[39m)e[33m;e[39m
e[90m 5 | e[39m}
e[90m 6 | e[39me[0m
at Parser.pp$5.raise (/home/ccuser/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/home/ccuser/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$1.parseFunction (/home/ccuser/node_modules/babylo


function () { $(’.skillset’).hide();

<do not remove the three backticks above>


This looks like a handler callback function when it should be an inline statement…



but there is supposed to be a space between function and its parentheses.
i tried it without the space and it still doesn’t pass.
without the space the error moves to 3:8


this seems to give me the same problem aswell

function () { $(’.skillset’).hide(); }


Don’t write it inside a function body. It is a direct (inline) statement.



even after using this:


it gives me this error message:
"Did you write a jQuery selector for the skillset element?"
but this IS the jQuery selector


Just noticed my example is missing the dot, but you caught that. I don’t see anything wrong with your code. Since you are using the same selector for both statements you can chain them…


which just makes it easier to read and follow.

Can you post your complete code, please?



error that follows:
Did you write a jQuery selector for the skillset element?


Is that all the code you have?


same error message with this answer aswell:



The problem is your script is likely running before the DOM content has finished loading. You need a ready event wrapper.

$(document).ready(function () {


const main = function () {


Make sure your code does not contain smart quotes. Use the standard single or double quotes.



this is why i had the function earlier on in the post (because of the previous lesson)
I started to delete everything once i kept getting error messages.
it seems that earlier on i missed “main” after the function.

once again thanks for your time


This topic was automatically closed after 7 days. New replies are no longer allowed.