Opened 9 years ago

Closed 8 years ago

#4382 closed bug (fixed)

Accordion does not function in IE7/WinXP

Reported by: mkornblum Owned by:
Priority: major Milestone: 1.8
Component: ui.accordion Version: 1.7.1
Keywords: accordion ie theme .ui-helper-reset Cc:
Blocked by: Blocking:


Ref: Ticket 4331 (

This problem still occurs in IE7 using JQuery 1.3.2 and JQuery UI 1.7.1, even after adding:

.ui-helper-reset { border: 0; }

To my site's CSS.

test case here: (not the most minimal!)

Specifying "animated: false" when initializing the accordion fixes the issue, but is not as pretty.

Test here without animation here:

Change History (7)

comment:1 Changed 9 years ago by mkornblum

Also should mention: works fine (with animation) in IE6; it is only IE7 that is still broken.

comment:2 Changed 9 years ago by Scott González

Milestone: TBD1.8

comment:3 Changed 9 years ago by wewals

The linked test case works for me under IE7 on Windows XP. Can anyone reproduce?

comment:4 Changed 9 years ago by smadep

could reproduce this on IE7 7.0.5730.13 after first area was opened no other area could be opened

comment:5 Changed 9 years ago by DiRN

If this is the error that I'm experiencing, the problem is a divide by 0 error.

jQuery UI 1.7.2 (ui.core.js), line 3435 (the line number will vary by version)

percentDone = ( - settings.start) / (settings.end - settings.start);

should be something along the lines of

percentDone = (settings.end - settings.start) != 0 ? ( - settings.start) / (settings.end - settings.start) : 0;

With the correct code, percentDone ends up with a value of NaN. When using NaN, the following lines result in an error in IE7.

options.toShow[0].style[settings.prop] =
	(percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit;

comment:6 in reply to:  5 Changed 9 years ago by abaumhau

Replying to DiRN:

If this is the error that I'm experiencing, the problem is a divide by 0 error.

I can confirm that this is a divide by zero error in percentDone. The problem exists on IE8 when not in compatibility mode. The settings.{now|start|end} are all zero, and percentDone = NaN. This causes an invalid option on line 486 in jquery.ui.accordion.js. The fix listed does work. Thanks much.


comment:8 Changed 8 years ago by Scott González

Resolution: fixed
Status: newclosed

Fixed in r3703.

Note: See TracTickets for help on using tickets.