Although I passed the stage by directly putting $('#fourth') instead of the variable $target but I want to understand why my code didn't work with the $target variable?

<!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>
                        <li id="fourth">jQuery is for chumps!</li>
                <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 = $('#fourth');


you should declare target inside the document ready function content


Thank you :thumbsup:

But again this code doesn't work

$(document).ready(function() {
var $target = $('ol:nth-child(4)');


if you don't, nothing will trigger the var $target = $('#fourth'); code to run


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