3 variables


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

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

thanks in advance.


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?


thanks for your help.
i understand that now.