diff options
author | Ca-Phun Ung <pazu2k@gmail.com> | 2008-10-02 18:49:42 +0000 |
---|---|---|
committer | Ca-Phun Ung <pazu2k@gmail.com> | 2008-10-02 18:49:42 +0000 |
commit | 898c395227c195b9300e686765e230a21bf18618 (patch) | |
tree | 48e2ea74433e66d10bb9044f1b70424cf3c593af /ui | |
parent | 5958c417f65cf779845cae2d107926fbaf6c7f7f (diff) | |
download | jquery-ui-898c395227c195b9300e686765e230a21bf18618.tar.gz jquery-ui-898c395227c195b9300e686765e230a21bf18618.zip |
Spinner: fixed IE6 bugs with spinner height for data lists.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.spinner.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js index 9f6567a76..a99735f15 100644 --- a/ui/ui.spinner.js +++ b/ui/ui.spinner.js @@ -142,16 +142,17 @@ $.widget('ui.spinner', { // Manipulate height of spinner. this._items = this.element.children().length; if (this._items > 1) { + var height = this.element.outerHeight()/this._items; this.element .addClass('ui-spinner-list') - .css('height', this.element.outerHeight()/this._items) + .height(height) .children() .addClass('ui-spinner-listitem') - .css('height', this.element.outerHeight()) + .height(height) .css('overflow', 'hidden') .end() .parent() - .css('height', this.element.outerHeight()) + .height(height) .end(); this.options.stepping = 1; this.options.min = 0; @@ -288,7 +289,7 @@ $.widget('ui.spinner', { }, _animate: function(d) { if (this.element.hasClass('ui-spinner-list') && ((d == 'up' && this._getValue() <= this.options.max) || (d == 'down' && this._getValue() >= this.options.min)) ) { - this.element.animate({marginTop: '-' + this._getValue() * this.element.outerHeight() }, { + this.element.animate({marginTop: '-' + this._getValue() * this.element.parent().height() }, { duration: 'fast', queue: false }); |