mjcreative Posted January 21 Share Posted January 21 I may be trying to achieve the impossible but I've created a hover portfolio collection page and am now trying to inject that page section across several other standard pages using javascript. The portfolio collection is named Portfolio Categories and I'm inputting a code block on the other pages with <div class="categories-section"></div> to load in the portfolio collection. But it's not loading correctly. It's obviously partially working because I see the code, but it's not displaying properly so not sure where I am going wrong? I'm definitely not a javascript expert but was really hoping I could get this working. <script type="application/javascript"> $(function() { $('.categories-section').load('/portfolio-categories .portfolio-hover',function(){ window.Squarespace.initializeLayoutBlocks(Y); }); }); </script> If anyone has any input would greatly appreciate some guidance! Site is https://designauthentic.squarespace.com/ and password is designauthentic Link to comment
Beyondspace Posted January 22 Share Posted January 22 On 1/21/2023 at 9:28 AM, mjcreative said: I may be trying to achieve the impossible but I've created a hover portfolio collection page and am now trying to inject that page section across several other standard pages using javascript. The portfolio collection is named Portfolio Categories and I'm inputting a code block on the other pages with <div class="categories-section"></div> to load in the portfolio collection. But it's not loading correctly. It's obviously partially working because I see the code, but it's not displaying properly so not sure where I am going wrong? I'm definitely not a javascript expert but was really hoping I could get this working. <script type="application/javascript"> $(function() { $('.categories-section').load('/portfolio-categories .portfolio-hover',function(){ window.Squarespace.initializeLayoutBlocks(Y); }); }); </script> If anyone has any input would greatly appreciate some guidance! Site is https://designauthentic.squarespace.com/ and password is designauthentic Do you mean getting the content from this page then render it into another page? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
mjcreative Posted January 22 Author Share Posted January 22 @Beyondspace No, from the https://designauthentic.squarespace.com/portfolio-categories portfolio page. I've determined that it's rendering the html but there is clearly a script on the Portfolio page that is adding the data attributes that isn't coming through. 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