Expandable Text Section "Teaser"

Hello, i think I am trying the same as mentioned in this topic: Text expandable section by clicking on a button (read more)
I did use your guidelines mentioned like above but it doesnt seem to work. I am not sure if I fully understood.
I did usa a Text Element and a Button Element underneath for this.

Maybe explain my case: I have a text “teaser” and the user should be able to read more when clicking on an icon like “+” it will then flap open the rest of the text. In the end of the text (or wherever) should be the icon “x” with something like "close " or “less”.

Accordation Element cant work with a Textteaser, can it?

Can you help me with this? Thank you very much.

Regards, Viktori

Hello Viktori,

Thanks for writing to us.

The feature that you want, It can be archive by our Accordion element. Please have a look at our doc to learn more about how to archive the layout through Accordion. https://theme.co/docs/accordion

In case if you want to achieve it through custom CSS and JS code as referred in the thread, you can follow that but there is JS syntax error and CSS is not there since it has been share by one of the user. Please note that we don’t provide custom development support. It is out of the support scope.

JS Code

jQuery ( function($) {
$('#btn_Readmore').on('click', function(e){
e.stopPropagation();
e.preventDefault();
$( "#collapsibleContent" ).slideToggle( "slow", function() {
$('#btn_Readmore').text($('#btn_Readmore').text() == "+ Read more" ? "- Show less" : "+ Read more");
});
});
 });(jQuery); 

CSS Code

div#collapsibleContent {
    display: none;
}

Please note that the code provided in the above thread serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Thanks for understanding

Thank you! :slight_smile:

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.