General developer forum

Bootstrap 4 "Accordion" component

 
Picture of Bob Heckmann
Bootstrap 4 "Accordion" component
 

I'm running MDL 3.31 with the Boost theme. I've entered html directly in the description field for one of my course categories, which consists of three (3) Bootstrap 4 Accordion blocks. 

Everything works as expected outside of Mdl (i.e. when the page is served via it's URL - www.domain.com/filename.html) but when when I click the accordion buttons on the version running in Mdl the "collapsible" behavior doesn't work as expected. The native behavior for the component is when a button is clicked any other open cards in that accordion set collapse so only one card is open at a time. In Mdl, open cards don't collapse when subsequent buttons are clicked.

Am I correct to assume the code should word the same in Mdl as it does on a regular html page or is that not the case?

Thanks,

Bob

 
Average of ratings: -
Picture of Howard Miller
Re: Bootstrap 4 "Accordion" component
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

You mean the 'Collapse' component, yes?

The Bootstrap js stuff appears to have been chopped up and included in a bunch of AMD modules in Boost. There is one for Collapse and I think the navbar uses it. 

The chances are that Atto is killing whatever HTML you are adding to the page. That's been my experience. 

 
Average of ratings: -
Picture of Bob Heckmann
Re: Bootstrap 4 "Accordion" component
 

Correct, I meant 'Collapse'. Thanks for clarifying and thanks for replying.

 
Average of ratings: -
Gareth J Barnard
Re: Bootstrap 4 "Accordion" component
Core developersParticularly helpful MoodlersPlugin developers

In the interests of not having duplicate posts, please continue here https://moodle.org/mod/forum/discuss.php?d=365889 - where I have replied in detail and would not wish to lose that - and assume this post / thread is closed.

As a reminder to everyone to follow the rules please: https://moodle.org/mod/page/view.php?id=7080 - 'Post your question in one forum only'.

 
Average of ratings: -