"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
-
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/topic/4896/accordion-bug/23?_=1643372835433
-
@dingdong Have a look at what I made before, it might work for you.
http://laythemeforum.com/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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login