Jump to content

Vertical Image Stack Scroll

Recommended Posts

Hi there,

I'm looking to add a code to that will allow for a vertical scroll stacked image function in Squarespace like this: https://kyhastudios.com/au/products/berkeley?variant=41317405622408. I want the images displayed on the left side scrollable, and the right side to remain stagnant. I will have a number of pages that will need to use this code to display a client's dresses, note these pages will be regular Squarespace pages and not ecommerce shoppable product pages.

Thanks, Em

Link to comment
  • Replies 6
  • Views 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

21 hours ago, EmmaJadeW said:

It's for a regular page, not shoppable product pages. You can see an example of an existing page set up here: https://www.spherebridalgallery.com/chosen-by-kyha-azul, but as mentioned, would like to make the images scrollable like this https://kyhastudios.com/au/products/berkeley?variant=41317405622408

Try to imagine your layout.

So the page will have

Left is vertical image (1 or more images)

Right is description

and under both is related items

Is that right?

Your request is possible, but I need to know exactly to think the most appropriate solution.

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

To make vertical images we can use Gallery Section Grid (then use code to make it show 1 image/row). To make gallery image - text section side by side, we can use code.

Demo: https://tuanphan3.squarespace.com/vertical-image-stack-scroll?noredirect

Pass: abc

All steps should be

(1) Add this code to Website Tools (under Not Linked/Hidden) > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $('.custom-slider-item').closest('section.page-section').addClass('custom-slider-item');
  $('section.custom-slider-item').wrapAll('<section class="custom-slider-parent"></section>');
});
</script>
<style>
  @media screen and (min-width:768px) {
section.custom-slider-parent {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
}
section.custom-slider-parent>section:nth-child(2) {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
}
section.custom-slider-item .gallery-grid-wrapper {
    grid-template-columns: repeat(1,1fr) !important;
    grid-gap: 0 !important;
    padding: 0 !important;
    }}
</style>

(2) Add 2 sections

Top is Gallery Grid

Second is standard section

(3) Enable Gallery Grid Caption

image.thumb.png.7e4ae55ef521c23d3aa2ebff7528b2d6.png

(4) Edit first image > Paste this code

<span class="custom-slider-item"></span>

image.thumb.png.9b53856a9bfb3b8e7d185dbcd9c6cac5.png

(5) Edit Text Section > Add a Code Block > paste this code

<span class="custom-slider-item"></span>

image.thumb.png.c43cc8322929decde2f29738e061782e.png

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
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.