I have just updated my project's jQuery from 1.9.2 to 1.11.2 and everything seems to be working fine except that my accordion is now so large that I cannot see the content. Prior code:
$('.accordion').accordion({
autoHeight: false,
fillSpace: true,
collapsible: true,
navigation: true
});
As autoHeight, fillSpace and navigation are all deprecated I have updated this to...
$('.accordion').accordion({
heightStyle: "fill",
collapsible: true
});
Now I have massive margins below each closed accordion tab and the text is huge. A quick search of the resulting code shows that the only thing that is missing is the ui-helper-reset class on the h3-element (i.e. .accordion has it, all my content divs have it, but all h3-elements do not).
If I add the class by hand the headers look like they did before. Any ideas on how to get the class to be added?
This is an internal issue. There is an old custom jQueryUI CSS file (1.8.23) that is messing everything up. I looked at jQuery UI accordions CSS that is generated and the ui-helper-reset is no longer being added to header. Which works, if you do not have an old custom CSS file in the way.
how about .addClass()?
$('.accordion').accordion({
heightStyle: "fill",
collapsible: true
}).find("h3").addClass("ui-helper-reset");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With