aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.progressbar.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-04-16 01:57:56 +0000
committerScott González <scott.gonzalez@gmail.com>2009-04-16 01:57:56 +0000
commit62f11b4a2ee8a8c10c51d614e37af1f0216385db (patch)
tree0d9b556dbdaa19a3f0da85e2a0dc31621f123ef6 /ui/ui.progressbar.js
parent1195854aaad61308e7f5339eed54f92284d7666e (diff)
downloadjquery-ui-62f11b4a2ee8a8c10c51d614e37af1f0216385db.tar.gz
jquery-ui-62f11b4a2ee8a8c10c51d614e37af1f0216385db.zip
Progressbar: Modified value method to act as both a getter and setter. Fixed #4427 - progressbar('value') returns a reference to this instead of the value.
Diffstat (limited to 'ui/ui.progressbar.js')
-rw-r--r--ui/ui.progressbar.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/ui.progressbar.js b/ui/ui.progressbar.js
index 6988f8dff..1cf077cae 100644
--- a/ui/ui.progressbar.js
+++ b/ui/ui.progressbar.js
@@ -56,8 +56,12 @@ $.widget("ui.progressbar", {
},
value: function(newValue) {
- arguments.length && this._setData("value", newValue);
- return this._value();
+ if (newValue === undefined) {
+ return this._value();
+ }
+
+ this._setData('value', newValue);
+ return this;
},
_setData: function(key, value) {