How do I select the 4th list item?


#1


  • jQuery is for chumps!
  • how do I select that with my JQuery?



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


    <!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>
                            <li>jQuery is for chumps!</li>
                        </ol>
                    </li>
                    <li>Inputs are separated by commas.</li>
                    <li>Inputs can include other functions!</li>
                </ul>
            </div>   
    	</body>
    </html>
    
    //this is the my JQuery
    $(document).ready(function() {
        var target = 4;
        $target.fadeOut('fast');
    });


    #2

    var $target = $('li:nth-child(4)');

    It also needed to be inside quote..


    #3

    oh okay thanks I've been wait for help while browsing instagram
    lol


    #4

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