3. variables


#1


https://www.codecademy.com/courses/web-beginner-en-GfjC6/0/3?curriculum_id=50a3fad8c7a770b5fd0007a1#


Oops, try again. Did you create the $target variable on line 3?


Replace this line with your code. 
<!DOCTYPE html>
<html>
	<head>
		<title>Simplify, Simplify</title>
        <script type='text/javascript' src='script.js'></script>
	</head>
	<body>
        <div> Remember!
            <ul>
                <li>
                    <ol>
                        <li>Start with the function keyword</li>
                        <li>Inputs go between ()</li>
                        <li>Actions go between {}</li>
                        <div class = "4"><li>jQuery is for chumps!</li> </div>
                    </ol>
                </li>
                <li>Inputs are separated by commas.</li>
                <li>Inputs can include other functions!</li>
            </ul>

// Write your jQuery code on line 3!
$(document).ready(function() {
    var target = $(".4");
    $(target).fadeOut('fast');
});


#2

It's very likely that the numeric class name is not recognized. Make the name start with a letter. The class should be applied to the LI. <div></div> is not a valid child element of <ul></ul> or <ol></ol>.

The instructions suggest we need to use our knowledge of CSS, and since the module is focused on pseudo-classes this would be a perfect opportunity to practice. How might we traverse the DOM tree to reach only the fourth LI in the OL?


#4

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