1.Creating HTML Elements worded confusingly?



In script.js I put the following code because I thought it was what the instructions was asking for based on the wording:

In script.js, create a variable, $h1, and set it equal to a jQuery object CONTAINING an <h1> tag with the text "Hello". The tag should be a string.

The emphasis is mine. If they wanted me to instead target <h1>Hello</h1> ... that's just a little silly of a way to ask for it no?

var $h1 = $("h1:contains('Hello')");

I just don't get this instruction and think it should be reworded.



The instructions tell you to store in a variable named $h1 the h1 tag with the text Hello. Remember how to select an html element:

var $varName = $('<tagname>something in here<tagname>');


So the instructions wanted me to create the HTML element, not find it. I guess I get used to finding clues from their instructions and went too far! Thanks!


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