General developer forum

Using bootstrap code in a Moodle plugin

 
Picture of Richard Jones
Using bootstrap code in a Moodle plugin
Particularly helpful MoodlersPlugin developersTesters

I have a plugin that displays an iframe within a bootstrap 3 collapsible panel (similar to this: https://www.w3schools.com/bootstrap/bootstrap_collapse.asp).  Clicking a link will toggle the panel. 

It works for me across major browsers but another user reports an issue.

Is there a better Moodle way to achieve this?  I noticed the Moodle CSS "hide" class is described as "obsolete" and the html/css general guidelines project is noted to be dead.

The iframe is used because it is displaying an embedded Moodle page (from the same site) within it.

Advice gratefully received.

 
Average of ratings: -
Picture of Dave Emsley
Re: Using bootstrap code in a Moodle plugin
Particularly helpful Moodlers

What issue does the other user report?


 
Average of ratings: -
Picture of Richard Jones
Re: Using bootstrap code in a Moodle plugin
Particularly helpful MoodlersPlugin developersTesters

The other user got a blank iFrame but eventually tracked that down to a local setting.  

I've since changed the code to use a jQuery toggle in an AMD module in place of the Bootstrap code.



 
Average of ratings: -