Lesson 2/23 _ codecademy system broken?


#1

Hey guys and girls,

In advance, I would like to thank you giving your time to considering to help me out.

If you look at the picture below, you see that the example on the left shows the selectors in pink, while in the editor it's just plain white.

Does anyone have any idea what I am doing wrong?

Thank you in advance,
-Yunus.


#2

1

Add the following into your index.html
right AFTER the last closing div-Tag < /div>
and right before your closing body-tag < /body>

	<script>
 var ch1 =$('body h3').css('color');
 var ch2 =$('div h3').css('color');
 var ch3 =$('div div h3').css('color');
 var ch4 =$('div div div h3').css('color');
 $('<p>').text(ch1+ch2+ch3+ch4).appendTo('body');
	</script>

2

If you use a pre-pending-Dot in your CSS-stylesheet
the CSS-facility will be on the lookout for a HTML-Element which has the class-attribute set,
for instance .makeMeRed would require
a HTML-ELEMENT with **class="makeMeRed" in the index.html.

stylesheet.css

h3 { color: rgb(0, 0, 0); }
div div div h3{color:red;}

3

If you use h3 or div as CSS-selector they will talk about node-Selector
or HTML-Element-Selector.
As jQuery uses the same Selector-syntax as CSS
here an overview....
https://api.jquery.com/category/selectors/
http://api.jquery.com/class-selector/
https://api.jquery.com/element-selector/
http://www.w3schools.com/jquery/jquery_ref_selectors.asp