Skip to content

Commit e8a6db2

Browse files
author
Matthew Doyle
committed
Add case for auto sizing on open
1 parent ef8d667 commit e8a6db2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/jquery.accordion.js

+5
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@
192192

193193
requestAnimFrame(function() {
194194
$content.css('max-height', $content.data('oHeight'));
195+
196+
// Reset max height and set height to auto to allow dynamic
197+
// content sizing until the next accordion interaction
198+
$content.css('height', 'auto');
199+
$content.css('max-height', 'none');
195200
});
196201

197202
$accordion.addClass('open');

0 commit comments

Comments
 (0)