3. Variables by modifying with ID


In the hint section, it says "Remember, you can modify things directly using an id or class.". I've added an ID to index.html.

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

I've tried targeting this ID in script.js, for example with this.

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

But it's wrong. How do I target it? Of course, I've seen solutions like var $target = $('ol li:nth-child(4)'); on the forum, but no topic brings this targeting up. Is it possible to do it the way I set out to? How else would I use an ID or class?



Lesson 6 covers this. I mistakenly entered var $target = $(".falseInformation"); instead of var $target = $("#falseInformation");

When correcting this, it works.