"Read more"-Button
-
I’d like to implement a Read more button underneath my text block to expand and collapse it.
I read the following forum post but unfortunately the codepen is no longer available and I couldn’t get it to work after inspecting the original posters website.
I would like to know which content blocks need to be assigned the classes mentioned in the javascript.
-
Dear @lars
this is an accordeon thing you need top code yourself.
There is nothing by LayTheme preinstalled.Have a look at this fiddle:
https://jsfiddle.net/mariusjopen/r63w9jfg/Best!
Marius
-
@mariusjopen said in "Read more"-Button:
Dear Marius,
thank you very much, thats exactly what I wanted!
I put the the javascript in the header section as well as the css in the custom css section.
For the HTML I tried both the +HTML block as well as a +Text block. Unfortunately neither of them are working at the moment. -
Dear @lars
did you have a look here?http://laytheme.com/documentation.html#custom-javascript
Because your Lay Theme website is a "Single Page" JavaScript application you cannot just use
jQuery(document).ready(…)
to execute your js because the ready event only fires once when the website loads the first time.Best!
Marius
-
@mariusjopen
Is there a fixed link?
I want to do the same, but the link is broken?!
thx :) -
@dingdong Have a look at what I made before, it might work for you.
http://laythemeforum.com:4567/topic/4896/accordion-bug/23?_=1643372835433
-
@Remco-van-Dun THX!!!
worked perfect for me, just had to change
"panel.style.maxHeight" into more than 200px :D
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it