Skip to content
Permalink
Browse files

Accordion: Check for division by zero error during animation.

Fixes #4382 - Accordion does not function in IE7/WinXP.
  • Loading branch information
scottgonzalez committed Jan 20, 2010
1 parent 34266c3 commit b0195091a66f0c070610a09744c4325308b24534
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/jquery.ui.accordion.js
@@ -454,7 +454,7 @@ $.extend($.ui.accordion, {
return;
}
var overflow = options.toShow.css('overflow'),
percentDone,
percentDone = 0,
showProps = {},
hideProps = {},
fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
@@ -480,7 +480,8 @@ $.extend($.ui.accordion, {
// IE gets very inconsistent results when animating elements
// with small values, which is common for padding
if (settings.prop == 'height') {
percentDone = (settings.now - settings.start) / (settings.end - settings.start);
percentDone = ( settings.end - settings.start === 0 ) ? 0 :
(settings.now - settings.start) / (settings.end - settings.start);
}

options.toShow[0].style[settings.prop] =

0 comments on commit b019509

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