aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2011-10-19 12:54:08 -0500
committerCorey Frang <gnarf@gnarf.net>2011-10-19 12:54:08 -0500
commit2f89f356433d83a56135070c2f7d3b188c756b5a (patch)
tree041a0ba53313f1da3729e08bfaf0155c703ef752
parent1d6918174664a24530a4e6a523ccc80a11c69a72 (diff)
downloadjquery-ui-2f89f356433d83a56135070c2f7d3b188c756b5a.tar.gz
jquery-ui-2f89f356433d83a56135070c2f7d3b188c756b5a.zip
Widget: Refactoring setOptions loop to remove unnesecary closure / that reference
-rw-r--r--ui/jquery.ui.widget.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 31328a455..b78530dca 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -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;
},