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