PEA_jaz Posted June 17, 2021 Share Posted June 17, 2021 Hi Can any one help me understand one only one of my html code blocks work on squarespace? I have been able to have 2 markdown codes work on the same page, but with the HTML code it does not. I have two post, same html code, just different content. The code is for a read more/read less button. One works fine, but when I click on the other read more button it enables the first post to drop down instead of its own (second post). This is the code below - from some reading i think i need to add an element within the code that allows both or work separately on the same page? <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> #more {display: none;} </style> </head> <body> <h2>Read More Read Less Button</h2> <p>CONTENT<span id="dots"></span><span id="more">eCONTENT.</span></p> <button onclick="myFunction()" id="myBtn">Read more</button> <script> function myFunction() { var dots = document.getElementById("dots"); var moreText = document.getElementById("more"); var btnText = document.getElementById("myBtn"); if (dots.style.display === "none") { dots.style.display = "inline"; btnText.innerHTML = "Read more"; moreText.style.display = "none"; } else { dots.style.display = "none"; btnText.innerHTML = "Read less"; moreText.style.display = "inline"; } } </script> </body> </html> Link to comment
tuanphan Posted June 17, 2021 Share Posted June 17, 2021 Hi. Can you share link to page where you added both code? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
PEA_jaz Posted June 22, 2021 Author Share Posted June 22, 2021 Hi here is the link - https://olive-shark-cbsx.squarespace.com/config/pages Link to comment
tuanphan Posted June 22, 2021 Share Posted June 22, 2021 8 hours ago, PEA_jaz said: Hi here is the link - https://olive-shark-cbsx.squarespace.com/config/pages /config is admin url. See how to find page url. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
PEA_jaz Posted June 23, 2021 Author Share Posted June 23, 2021 Sorry the URL page name is: /about Link to comment
tuanphan Posted June 24, 2021 Share Posted June 24, 2021 On 6/23/2021 at 10:39 AM, PEA_jaz said: Sorry the URL page name is: /about It looks fine here. Did you solve? See video. https://www.loom.com/share/e075c735437347058a3747af07b87c39 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment