Defining element as variable.

Define a variable by selecting it using the element as a selector. This is useful for when shortening otherwise lengthy selectors. Source: http://www.codecademy.com

by clarusdignus

HTML

<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>

JavaScript

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