diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-02 14:06:54 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-02 14:06:54 +0200 |
commit | afe0f72945170879571ebaf060a816b39c9871b8 (patch) | |
tree | 8892e33dc624fe920c9d2838cac0d82b34e04882 /ui/jquery.ui.spinner.js | |
parent | cfaddbfb2a49fbd7f511d49f6404c7447469c5b0 (diff) | |
parent | 27a4fdd8ed4fe7733ea139022c04bd7ef8033cba (diff) | |
download | jquery-ui-afe0f72945170879571ebaf060a816b39c9871b8.tar.gz jquery-ui-afe0f72945170879571ebaf060a816b39c9871b8.zip |
Merge branch 'master' into widget-factory-demo
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r-- | ui/jquery.ui.spinner.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 2709175b5..b4cefc982 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -14,13 +14,14 @@ (function( $ ) { $.widget( "ui.spinner", { + version: "@VERSION", defaultElement: "<input>", widgetEventPrefix: "spin", options: { incremental: true, max: null, min: null, - numberformat: null, + numberFormat: null, page: 10, step: null, value: null @@ -62,6 +63,7 @@ $.widget( "ui.spinner", { // add buttons .append( self._buttonHtml() ) // add behaviours + .disableSelection() // TODO: user ._hoverable .hover(function() { if ( !options.disabled ) { @@ -251,7 +253,7 @@ $.widget( "ui.spinner", { this.counter > 20 ? this.counter > 100 ? this.counter > 200 - ? 100 + ? 100 : 10 : 2 : 1); @@ -318,13 +320,13 @@ $.widget( "ui.spinner", { _parse: function( val ) { if ( typeof val === "string" ) { - val = $.global && this.options.numberformat ? $.global.parseFloat( val ) : +val; + val = $.global && this.options.numberFormat ? $.global.parseFloat( val ) : +val; } return isNaN( val ) ? null : val; }, _format: function( num ) { - this.element.val( $.global && this.options.numberformat ? $.global.format( num, this.options.numberformat ) : num ); + this.element.val( $.global && this.options.numberFormat ? $.global.format( num, this.options.numberFormat ) : num ); }, destroy: function() { @@ -368,6 +370,4 @@ $.widget( "ui.spinner", { } }); -$.ui.spinner.version = "@VERSION"; - }( jQuery ) ); |