From 62f11b4a2ee8a8c10c51d614e37af1f0216385db Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 16 Apr 2009 01:57:56 +0000 Subject: 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. --- ui/ui.progressbar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui') 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) { -- cgit v1.2.3