I'm learning jQuery by trying to understand other people's code. I ran into this:
jQuery.fn.myFunc = function(options, callback) {
//stuff
jQuery(this)[settings.event](function(e) {
var self = this,
$self = jQuery( this ),
$body = jQuery( "body" );
//etc.
}
//more stuff
}
My understanding is that $
refers to the jQuery object. So why put $
with $self
and $body
? And is self
the same as $self
?