aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-10-24 15:57:58 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-10-24 15:57:58 +0200
commit1be2a79076e4da314ca6317082fbd8c03e7f9d63 (patch)
treefabebf6bef4630fb37c2f762187ac68bc283c629 /ui/jquery.ui.spinner.js
parent02d8f914b68f73537dcaca272087b544b366bb2b (diff)
downloadjquery-ui-1be2a79076e4da314ca6317082fbd8c03e7f9d63.tar.gz
jquery-ui-1be2a79076e4da314ca6317082fbd8c03e7f9d63.zip
Spinner: More cleanup
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js35
1 files changed, 11 insertions, 24 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index 02bb41ac0..a9238a738 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -28,7 +28,6 @@ $.widget('ui.spinner', {
mouseWheel: true,
numberformat: "n",
page: 5,
- spinnerClass: null,
step: null,
value: 0
},
@@ -141,10 +140,7 @@ $.widget('ui.spinner', {
self.uiSpinner = uiSpinner;
},
_uiSpinnerHtml: function() {
- return '<div role="spinbutton" class="' + uiSpinnerClasses +
- (this.options.spinnerClass || '') +
- ' ui-spinner-' + this.options.dir +
- '"></div>';
+ return '<div role="spinbutton" class="ui-spinner-' + this.options.dir + '"></div>';
},
_buttonHtml: function() {
return '<a class="ui-spinner-button ui-spinner-up ui-corner-t' + this.options.dir.substr(-1,1) +
@@ -278,26 +274,17 @@ $.widget('ui.spinner', {
}
return this.options[key];
},
- _setOption: function(key, value) {
- switch (key) {
- case 'value':
- value = this._parse(value);
- if (value < this._min()) {
- value = this._min();
- }
- if (value > this._max()) {
- value = this._max();
- }
- break;
- case 'spinnerClass':
- this.uiSpinner
- .removeClass(this.options.spinnerClass)
- .addClass(uiSpinnerClasses + value);
- break;
- }
-
+ _setOption: function(key, value) {
+ if (key == 'value') {
+ value = this._parse(value);
+ if (value < this._min()) {
+ value = this._min();
+ }
+ if (value > this._max()) {
+ value = this._max();
+ }
+ }
$.Widget.prototype._setOption.call( this, key, value );
-
this._afterSetData(key, value);
},
_afterSetData: function(key, value) {