Hi! We have a parallax page and are wanting to set certain lengthier sections to be displayed maybe 400px high with a “View More” button which then expands the entire section to reveal all the content. I found the following code on one of your other posts here: https://theme.co/apex/forums/topic/hide-and-show-section-on-button-click/
jQuery ( function( $ ) {
$(’.section-expandable’).css({ display: ‘none’ });
$(’.section-trigger’).on( ‘touchend click’, function( e ) {
e.preventDefault();
$(’.section-expandable’).css({ display: ‘none’ });
$( $(this).attr(‘href’) ).toggle(‘show’);
} );
} );
I added this to Global Javascript, then added an id “photos1” to the text section I want to control the height of, and made the class “section-expandable.” I then created my button with the Href set to "#photos1# and made the button class “section-trigger.” What’s happening is that the text section is completely collapsed and the button doesn’t open it at all. So:
Question #1: How do I control the height of the text section, and Question #2, is it possible to have my button then expand the full text section?
Thank you so much for any assistance!!! You guys have THE BEST support and knowledge base ever!!