Select Page

This code by Divi Notes worked perfectly. Be mindful that the BUTTON is given a CSS Class and the SECTION, ROW, or MODULE is given a CSS ID — only one per page can be used. I had accidentally assigned both a Class at first and it didn't work, and then I realized my mistake.

You can see it in action in the comments section of any of my posts on TravelisLife.org. I turned the Comments into a dropdown.

CSS:

<style type="text/css">
.rv_button.closed:after {content:"";}
.rv_button.opened:after{content:"";}
</style>

Javascript:

<script type="text/javascript">
 jQuery(document).ready(function() {
// Hide the div
jQuery('#reveal').hide();
jQuery('.rv_button').click(function(e){
e.preventDefault();jQuery("#reveal").slideToggle();
jQuery('.rv_button').toggleClass('opened closed');
});
});
</script>

BUTTON: Give it a CSS Class of “rv_button closed” (with the space and without the quotes).

SECTION, ROW, or MODLE: Give it a CSS ID of “reveal