]> source.dussan.org Git - jquery-ui.git/commitdiff
Progressbar: Do not duplicate base _setOptions method
authorKris Borchers <kris.borchers@gmail.com>
Sun, 11 Nov 2012 07:52:02 +0000 (16:52 +0900)
committerKris Borchers <kris.borchers@gmail.com>
Sun, 11 Nov 2012 07:52:23 +0000 (16:52 +0900)
ui/jquery.ui.progressbar.js

index 5a7fd87d37e93dd1c7da9bff5291f392930ab6fa..6c3d7dadd2517cc0b0843d8b2f2ad19a9e7fccd5 100644 (file)
@@ -79,16 +79,10 @@ $.widget( "ui.progressbar", {
        },
 
        _setOptions: function( options ) {
-               var key, val;
-
-               for ( key in options ) {
-                       if ( key === "value" ) {
-                               // Store value to update last in case max is being updated at the same time
-                               val = options[ key ];
-                       } else {
-                               this._setOption( key, options[ key ] );
-                       }
-               }
+               var val = options.value;
+
+               delete options.value;
+               this._super( options );
 
                if ( val !== undefined ) {
                        this._setOption( "value", val );