aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-07 08:20:14 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-07 08:20:14 -0400
commit051b9e07d9f15a7ee81b9ada1648615cbb85aad9 (patch)
tree5b1362f7216bd2a595af210d78142f08b20c740c /ui/jquery.ui.spinner.js
parent8799ba08225d00113df2ed9d5ff4cf9f69b1dd22 (diff)
downloadjquery-ui-051b9e07d9f15a7ee81b9ada1648615cbb85aad9.tar.gz
jquery-ui-051b9e07d9f15a7ee81b9ada1648615cbb85aad9.zip
Spinner: Use _getCreateOptions() for value.
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index a207a8aed..138d32f0a 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -24,7 +24,7 @@ $.widget( "ui.spinner", {
numberFormat: null,
page: 10,
step: 1,
- value: null,
+ value: 0,
change: null,
spin: null,
@@ -33,7 +33,7 @@ $.widget( "ui.spinner", {
},
_create: function() {
- this.value( this.options.value !== null ? this.options.value : this.element.val() || 0 );
+ this.value( this.options.value );
this._draw();
this._mousewheel();
this._aria();
@@ -43,9 +43,9 @@ $.widget( "ui.spinner", {
var options = {},
element = this.element;
- $.each( [ "min", "max", "step" ], function( i, option ) {
+ $.each( [ "min", "max", "step", "value" ], function( i, option ) {
var value = element.attr( option );
- if ( value !== undefined ) {
+ if ( value !== undefined && value.length ) {
options[ option ] = value;
}
});