Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI Accordion Header: ui-helper-reset is not being added

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?

Update

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.

like image 910
PunkCode Avatar asked Nov 09 '22 22:11

PunkCode


1 Answers

how about .addClass()?

$('.accordion').accordion({
    heightStyle: "fill",
    collapsible: true
}).find("h3").addClass("ui-helper-reset");
like image 166
Banana Avatar answered Nov 15 '22 04:11

Banana