Accordion missing in js/jquery.ui.js?

Permalink
I have added the jquery.ui.js shipped with 5.5.1 and it seems like there is no accordion code in this file. How can I add it?

malthoff
 
jordanlev replied on at Permalink Reply
jordanlev
If this is just for one site you're building (not a package you want to distribute on the marketplace), I think your best bet is to download a fuller version of jQuery UI that includes the accordion, name that file jquery.ui.js, and put that into your site's top-level /js/ directory. C5 will use that instead of its own.

Two things to watch out for though:

1) Make sure the new jquery ui file you download includes all of the things that C5's jquery UI file has (you'll have to scroll through the SITEROOT/concrete/js/jquery.ui.js file and scan the comments above each section to see what they are).

2) C5 only include jquery UI when someone is logged in and editing the site, so you'll need to explicitly include it yourself in your theme's <head>.

Seehttp://www.concrete5.org/community/forums/customizing_c5/setblockwr... for an example of how I've done this recently (only works in 5.5+ though because of the addFooterItem thing -- but if you're using 5.4, change that to addHeaderItem and make sure it's ABOVE the Loader::element('header_required') line in your theme head).