Can someone explain why this doesn't work ? 3. Variables


Hi. I am at a loss here as to why this doesn't work.
I'm stuck at this excercise:

Here's my code

// Write your jQuery code on line 3!
$(document).ready(function() {
   var $target = ('ol li:nth-child(4)');


<!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>jQuery is for chumps!</li>
                <li>Inputs are separated by commas.</li>
                <li>Inputs can include other functions!</li>

I have also tried assigning a class="4" and changing
var $target = ('ol li:nth-child(4)');
var $target = ('#4');

Anybody got any suggestions ?


to select an element with jquery:


in your case, the $ is missing

Also, classes use a . and id's use #, remember?


Thank you. Of course.. It's always the small little things you miss..

Appreciate the help!