lbencur25 Posted November 15 Share Posted November 15 Hi! In the top portion of my website I have a summary block slideshow that is pulling images from my blog. I would like to change the animation of this from sliding to fading in quickly if that makes sense. I watched a youtube video to get this code and hers does not have the sliding effect that mine has. I also do not want there to be arrows showing as well. Does anyone have code for this? This is the current code I have in the code injection header: <!-- Summary Block Auto-Scroll --> <script> window.onload = function() { var nextArrow = document.querySelector(".summary-carousel-pager-next"); function clickNext() { nextArrow.click(); } setInterval(clickNext, 4000); }; </script> A picture is attached of what I am talking about as well. Thanks in advance! Link to comment
SaranyaDesigns Posted November 15 Share Posted November 15 @lbencur25 hello! can you share a link to your site so we can see the animation in action? Link to comment
lbencur25 Posted November 16 Author Share Posted November 16 @SaranyaDesigns oh yes sorry I thought I did. https://www.courtneyfitzpatrick.com/ Link to comment
Solution SaranyaDesigns Posted November 16 Solution Share Posted November 16 @lbencur25 it's possible you did but for some reason squarespace forum doesn't publicly display it unless you include the link in the body of the post... it's silly... Anyway... It looks like the way this particular slider is built is that all the images are already loaded onto the page in one long line like a conveyor belt but hidden from view until the javascript moves them into the viewport... which is going to make it difficult to add a fade action instead of a slide action... it would be rewriting how the whole code block works. You would start by absolutely-positioning all the image blocks on top of each other with CSS and then writing some javascript to cycle through the opacity or visibility of each block at whatever interval you want. That's beyond my skillset unfortunately, but maybe someone else here can help! sorry! 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