Hello everyone,
I’m using the Debut Theme and I want my product images to be sticky. If you scroll down the product thumbnails should always be visible until another element / section comes up there. How can I do that?
To make the product images sticky we need to add JS code to detect the page scroll, Also to set a parameters on which stage we need to make them sticky as well.
It required CSS and Javascript code to do this. Following is the pretty basic code to achieve this :
Or if you need any other help feel free to contact on the below email thanks!
Hi there we tried adding this code and it works! (per the sticky part and scrolling) but, unfortunately gives a black shadow all around the product picture when hovering on it. We really would appreciate any help. We don’t know what we are doing wrong…plz help!
Hi @KetanKumar - thanks for this. URL is www.aleweston.com . I’ve just looked at it again on this product https://www.aleweston.com/collections/all-products/products/flower-cz-ear-cuff , it seems to happen more so when hovering towards the top of the image and also seems to be more of an issue on safari rather than chrome. Any help would be great, as we like the functionality change, but obviously the black box is a bit of a mess! Thanks again!
This is happening on desktop in safari. It strangely seems to be okay in chrome and on mobile. Any thoughts? Or perhaps we should strip out the code and try something else entirely?
Hi @KetanKumar , given it looks unprofessional on safari and we cannot legislate for which browser customers would choose to browse from we’ll need to remove the code as it simply doesn’t look good. Is there alternative code we could try to still give us what we need? Thanks!
@KetanKumar Please see attached screenshot. This is what we are getting our end still only in safari is not the case in chrome. So most of the black is gone now, only a line remains in between the product photo and info in the right side shows black (please see photo for reference) Any thoughts or suggestions?