Possible Duplicate:
jQuery $(this) vs this
This code in this video Tutorial
in a Very useful blog jquery for designers
$('.navigation').each(function () {
var $links = $('a',this);
$links.click(function () {
var $link = $(this),
link = this;
if ($link.is('.selected')) {
return;
}
$links.removeClass('selected');
$link.addClass('selected')
});
});
What is the difference between $(this)
and this
?
Please explain the simple difference in coding.