]> source.dussan.org Git - jquery-ui.git/commitdiff
updated: value method to make sure we have a clean API for v1.1
authorFelix Nagel <info@felixnagel.com>
Thu, 17 Feb 2011 01:16:22 +0000 (02:16 +0100)
committerFelix Nagel <info@felixnagel.com>
Thu, 17 Feb 2011 01:16:22 +0000 (02:16 +0100)
ui/jquery.ui.selectmenu.js

index af53d3fd47556ee8e23449e7ef2335057f0b3051..05d61c4efa9237ff2c37a272df4566e2dd905ae3 100644 (file)
@@ -629,14 +629,8 @@ $.widget("ui.selectmenu", {
 
        value: function(newValue) {
                if (arguments.length) {
-                       // FIXME test for number is a kind of legacy support, will be remoced in v1.1
-                       // see this post for more info: https://github.com/fnagel/jquery-ui/issues#issue/33
-                       if (typeof newValue == "number") {
-                                       this.index(newValue);
-                       } else if (typeof newValue == "string") {
-                               this.element[0].value = newValue;
-                               this._refreshValue();
-                       }
+                       this.element[0].value = newValue;
+                       this._refreshValue();
                } else {
                        return this.element[0].value;
                }