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
}
我的理解是$
指的是jQuery对象.那么为什么要把$
和$self
和$body
放在一起呢?self
和$self
一样吗?