Skip to content

Commit 00405eb

Browse files
author
Matthew Doyle
committed
Recalculate height before close
1 parent 17a6f74 commit 00405eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

js/jquery.accordion.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@
160160
function closeAccordion($accordion, $content) {
161161
$accordion.trigger('accordion.close');
162162

163+
// Make sure height is recalculated.
164+
refreshHeight($accordion);
165+
$content.css('max-height');
166+
163167
if(CSStransitions) {
164168
if(accordionHasParent) {
165169
var $parentAccordions = $accordion.parents('[data-accordion]');
@@ -256,7 +260,7 @@
256260
if(opts.singleOpen && $controls.length > 1) {
257261
return false;
258262
}
259-
263+
260264
toggleAccordion();
261265
});
262266

0 commit comments

Comments
 (0)