From: Corey Frang Date: Wed, 19 Oct 2011 17:54:08 +0000 (-0500) Subject: Widget: Refactoring setOptions loop to remove unnesecary closure / that reference X-Git-Tag: 1.9m7~175 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f89f356433d83a56135070c2f7d3b188c756b5a;p=jquery-ui.git Widget: Refactoring setOptions loop to remove unnesecary closure / that reference --- 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; },