3. variables



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

Replace this line with your code. 
<!DOCTYPE html>
		<title>Simplify, Simplify</title>
        <script type='text/javascript' src='script.js'></script>
        <div> Remember!
                        <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>
                <li>Inputs are separated by commas.</li>
                <li>Inputs can include other functions!</li>

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


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?


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