Widget: Refactoring setOptions loop to remove unnesecary closure / that reference

This commit is contained in:
Corey Frang 2011-10-19 12:54:08 -05:00
parent 1d69181746
commit 2f89f35643

View File

@ -270,10 +270,11 @@ $.Widget.prototype = {
return this;
},
_setOptions: function( options ) {
var that = this;
$.each( options, function( key, value ) {
that._setOption( key, value );
});
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},