Skip to content
Permalink
Browse files

Spinner: Use _getCreateOptions() for value.

  • Loading branch information...
scottgonzalez committed Aug 7, 2011
1 parent 8799ba0 commit 051b9e07d9f15a7ee81b9ada1648615cbb85aad9
Showing with 5 additions and 5 deletions.
  1. +1 −1 tests/unit/spinner/spinner_defaults.js
  2. +4 −4 ui/jquery.ui.spinner.js
@@ -7,7 +7,7 @@ commonWidgetTests( "spinner", {
numberFormat: null,
page: 10,
step: 1,
value: null,
value: 0,

// callbacks
change: null,
@@ -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;
}
});

0 comments on commit 051b9e0

Please sign in to comment.
You can’t perform that action at this time.