Jump to content

Adding a read more - read less button

Recommended Posts

I'm currently working on moving a website from version 7.0 to 7.1 and in the current version there is a code block that contains code that makes it possible to click a button that says "read more" so more of the text becomes available to read so the webpage doesn't become too long, and after clicking it, it changes to "read less". When I try to implement the same code on the new website it doesn't work. Any suggestions on how I could solve this problem and why the old code doesn't work? 

Link to comment
  • Liam94 changed the title to Adding a read more - read less button
  • Replies 3
  • Views 1.8k
  • Created
  • Last Reply

Thank you for your reply. 
This is the old website where the code is being used its version 7.0 - https://www.precure.dk/about-us

When I copy this code into 7.1 it doesn't do anything. 

<div class="show-hide">
   <input type="checkbox" class="read-more-state" id="Mission" />
   <div class="read-more-wrap">
     <h3><center>Mission</center></h3><p>At PRECURE, we are developing smart wearable IoT devices, which analyse muscular activity and provide biofeedback using  machine learning.</p>
     <p class="read-more-target">
       <p class="read-more-target">
           <p class="read-more-target">
            The user will change behaviour, hence experience less pain, recover faster, and avoid further injuries. This has a positive impact to people´s quality of life, adds cost and time efficiencies to companies, and it enables more effective and efficient treatment. Lastly it will be a huge benefit for society.
<br>
<br>
Patents pending.
               <p class="read-more-target">
   </div>
   <label for="Mission" class="read-more-trigger"></label>
 </div>
 

Link to comment
  • 2 weeks later...
On 3/8/2021 at 5:59 PM, Liam94 said:

Thank you for your reply. 
This is the old website where the code is being used its version 7.0 - https://www.precure.dk/about-us

When I copy this code into 7.1 it doesn't do anything. 

<div class="show-hide">
   <input type="checkbox" class="read-more-state" id="Mission" />
   <div class="read-more-wrap">
     <h3><center>Mission</center></h3><p>At PRECURE, we are developing smart wearable IoT devices, which analyse muscular activity and provide biofeedback using  machine learning.</p>
     <p class="read-more-target">
       <p class="read-more-target">
           <p class="read-more-target">
            The user will change behaviour, hence experience less pain, recover faster, and avoid further injuries. This has a positive impact to people´s quality of life, adds cost and time efficiencies to companies, and it enables more effective and efficient treatment. Lastly it will be a huge benefit for society.
<br>
<br>
Patents pending.
               <p class="read-more-target">
   </div>
   <label for="Mission" class="read-more-trigger"></label>
 </div>
 

Hi. This code missing CSS & Script code. Can you check again all code in old site?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.