3 variables


#1

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

why $target.fadeOut('fast'); not $('target').fadeOut('fast')

thanks in advance.


#2

Hi juan,

$('target') is a jQuery selector looking for the HTML <target> element, which doesn't exist.
$target is a variable we've declared that's equal to the fourth <li> in an ordered list.

Does that help clear things up for you?


#3

yes!
thanks for your help.
i understand that now.