diff options
author | Ca-Phun Ung <pazu2k@gmail.com> | 2008-09-20 14:46:26 +0000 |
---|---|---|
committer | Ca-Phun Ung <pazu2k@gmail.com> | 2008-09-20 14:46:26 +0000 |
commit | 27ba2ff84fc9ae9afc94c1625df7158ce43e7daf (patch) | |
tree | 951cab76fe83d79eb402f9e41cd1cb312c5fd0a9 | |
parent | 068d2483c973ff888d30d83b99f2b867a7907112 (diff) | |
download | jquery-ui-27ba2ff84fc9ae9afc94c1625df7158ce43e7daf.tar.gz jquery-ui-27ba2ff84fc9ae9afc94c1625df7158ce43e7daf.zip |
Spinner: decimals and stepping now independent (user request)
-rw-r--r-- | ui/ui.spinner.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js index f68da1903..98d10811d 100644 --- a/ui/ui.spinner.js +++ b/ui/ui.spinner.js @@ -17,13 +17,13 @@ $.widget('ui.spinner', { // terminate initialization if spinner already applied to current element if($.data(this.element[0], 'spinner')) return; - // check for onInit callback + // check for Init callback if (this.options.init) { this.options.init(this.ui(null)); } - // check for decimals in steppinng and set _decimals as internal (needs cleaning up) - this._decimals = 0; + // check for decimals in steppinng and set _decimals as internal + this._decimals = parseInt(this.options.decimals); if (this.options.stepping.toString().indexOf('.') != -1) { var s = this.options.stepping.toString(); this._decimals = s.slice(s.indexOf('.')+1, s.length).length; @@ -303,6 +303,7 @@ $.widget('ui.spinner', { $.extend($.ui.spinner, { defaults: { + decimals: 0, stepping: 1, start: 0, incremental: true, |