FOLLOW-UP: Problem with jQuery Selectors #5


I submitted a question yesterday. I received a reply from "Roy", which unfortunately raised other questions. But, Roy closed the topic, so I cannot post my new questions on the same topic.

The instructions are:
Let's select the element with the class of skillset, but this time with jQuery.
In js/main.js, inside the main function, write a variable named $skillset. Set $skillset equal to a jQuery selector for the skillset class.

Error message reads "Expected an identifier and instead saw "var".

I am missing something; I cannot figure out what is wrong with this code. My code is copied below:

function main() var header = $skillset = $('.skillset'); {

Recommend complete the JavaScript track first, before attempting this jQuery module. Clearly there are some missing components in your skillset. Topic closed.

I am currently doing the free side of the Codecademy stuff, to check stuff out first. I did the HTML & CSS lessons and then I did the HTML & CSS: Part I lessons, which were essentially the same, with some updated information and a slightly different format, but good to go through a second time.

When I finished those, Codecademy took me to the Learn JavaScript lessons, and I've worked my way through the first four.

I will admit to not totally understanding what I have worked through so far on the JavaScript stuff, but was hoping things would fall into place as I progressed.

Am I just missing stuff from the first four lessons, or is there something else I should be working on instead?


Replace this line with your code.


What I mean is that jQuery is all encompassing... HTML, CSS and JavaScript rolled into one. Any weakness in any of the these three API's will immediately be evident, and is just that in your posted code. You took the first four lessons of JavaScript and packed it in? As suggested, go back and complete that track. If there are any other HTML/CSS projects you have not completed that would be a good idea, too.

We are not here to teach. You are here to learn. This is a self-learning site and it's not our fault if you choose to jump into the deep end. Don't expect others to jump in and save you. We have the entire internet at our disposal so avail yourself of the documentation for all the API's and familiarize yourself with the syntax, keywords, data structures and constructs. If the old jQuery track is still available, complete that one, too. Then you can look on this project with confidence.

Also, if you really want others to help, then help them by posting a link to the exercise so they can review the instructions and get an idea of what is expected.

We're a long way off things just falling into a place. A very long way. Set this project aside and dig in to the fundamentals. Remember, this site is not a full curricullum course but an introduction so we can get our feet wet and asses our own aptitude in the field. What you learn here is a scratch on a scratch on a scratch. The real work is still ahead. If you give up here, just know you're giving up on the easiest step.


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