Timacious Posted July 19, 2021 Share Posted July 19, 2021 Site URL: https://monroe-dems.squarespace.com/ Is there a way for the list items (in gallery view) to autoscroll, that is, to rotate automatically, as if somebody was clicking the "next" arrow? Link to comment
tuanphan Posted July 20, 2021 Share Posted July 20, 2021 6 hours ago, Timacious said: Site URL: https://monroe-dems.squarespace.com/ Is there a way for the list items (in gallery view) to autoscroll, that is, to rotate automatically, as if somebody was clicking the "next" arrow? Add to Settings > Advanced > Code Injection > Footer <!-- Autolist Autoplay by creedon --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $( ( ) => { /* this code by Creedon SS forum */ const clickIntervalSeconds = 6; // do not change anything below, there be the borg here if ( window.frameElement !== null ) return; // bail if in Preview const selector = '.user-items-list-banner-slideshow__arrow-button--right'; const $button = $( selector ); if ( ! $button.length ) return; // bail if no button const click = ( ) => { $button.click ( ); } setInterval ( click, clickIntervalSeconds * 1000 ); } ); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Timacious Posted July 20, 2021 Author Share Posted July 20, 2021 I only had to make a small tweak to the code to get it to work – I changed .user-items-list-banner-slideshow__arrow-button--right to .user-items-list-carousel__arrow-button--right Awesome, thank you!!! Link to comment
Timacious Posted July 20, 2021 Author Share Posted July 20, 2021 Ok and my next question is, is there a way for the viewer to stop the scrolling action? For example if they click on the "back" arrow to go back one item, they probably don't want it to keep moving again. Or if they clicked anywhere in the list item (over any text that didn't have any link already) Link to comment
creedon Posted July 21, 2021 Share Posted July 21, 2021 (edited) Quote I only had to make a small tweak to the code to get it to work I had already added that feature to the code but that code was in a DM. Please see Section Auto Layout Right Arrow Auto Click. Edited September 20 by creedon Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
creedon Posted July 21, 2021 Share Posted July 21, 2021 6 hours ago, Timacious said: Ok and my next question is, is there a way for the viewer to stop the scrolling action? For example if they click on the "back" arrow to go back one item, they probably don't want it to keep moving again. Or if they clicked anywhere in the list item (over any text that didn't have any link already) That a is bit of a tricky one. I'd have to cogitate on this one a bit. I'm sure something can be done but how involved is it going to be? Once it's stopped, does it start up again? And if so, what is the interval for that. There are subtle things that fall out of a good user interface for this kind of auto play, stopping, starting behaviour. Bump this thread in several days to remind me if I've not pinged back. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Timacious Posted August 15, 2021 Author Share Posted August 15, 2021 I just got back from vacation recently and was glad to see your response. I think the preferred behavior is that the auto-scroll stops indefinitely, until the page is refreshed or reloaded in the browser. And the manual scroll (clicking on forward and back arrows) would not be affected either way (it would still work as usual). Link to comment
creedon Posted August 16, 2021 Share Posted August 16, 2021 Quote Ok and my next question is, is there a way for the viewer to stop the scrolling action? I have updated my code post. I added a kill upon user action. Let us know how it goes. Timacious 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Timacious Posted August 19, 2021 Author Share Posted August 19, 2021 I scrolled up and see you've provided a solution already. It works! Phenomenal -- thank you! I'll have another (different) request / question soon, I'm sure 🙂 creedon 1 Link to comment
Ekin Posted December 21, 2021 Share Posted December 21, 2021 On 7/20/2021 at 9:42 PM, creedon said: I had already added that feature to the code but that code was in a DM. Please see Auto Layout Right Arrow Auto Click. Hi- this code works great, thank you! Is there a way to hide the arrows? creedon 1 Link to comment
creedon Posted December 22, 2021 Share Posted December 22, 2021 7 hours ago, Ekin said: Is there a way to hide the arrows? Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Ekin Posted December 22, 2021 Share Posted December 22, 2021 16 hours ago, creedon said: Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. https://sphere-bassoon-s7rj.squarespace.com/epcs - the carousel is towards the bototm of page, and pw is kirankiran Link to comment
creedon Posted December 22, 2021 Share Posted December 22, 2021 (edited) On 12/21/2021 at 11:33 AM, Ekin said: Is there a way to hide the arrows? Add the following to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection. <style> /* desktop */ [data-section-id="61c0e388d893993c573b2206"] .user-items-list-banner-slideshow .arrow-container, /* mobile */ [data-section-id="61c0e388d893993c573b2206"] .user-items-list-banner-slideshow .mobile-arrows { display : none; } </style> This is for v7.1. Let us know how it goes. Edited January 7, 2022 by creedon version 2 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Ekin Posted December 22, 2021 Share Posted December 22, 2021 27 minutes ago, creedon said: Add the following to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection. <style> [data-section-id="61c0e388d893993c573b2206"] .user-items-list-banner-slideshow .arrow-container { display : none; } </style> This is for v7.1. Let us know how it goes. Works great, thank you so much! creedon 1 Link to comment
Ekin Posted January 7, 2022 Share Posted January 7, 2022 On 12/22/2021 at 11:31 AM, Ekin said: Works great, thank you so much! Hi- just noticed the arrows are still visible on mobile. Anyway it can be hidden across all breakpoints? Link to comment
creedon Posted January 7, 2022 Share Posted January 7, 2022 33 minutes ago, Ekin said: just noticed the arrows are still visible on mobile. Anyway it can be hidden across all breakpoints? I'm not seeing arrows on mobile. I checked my mobile emulation and on iPhone X. Can you tell us more about the mobile device? OS? Browser? Do you have a screenshot? Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Ekin Posted January 7, 2022 Share Posted January 7, 2022 30 minutes ago, Ekin said: Sorry I was looking at a page I did not apply code to yet. Apologies!! Looking over this again, actually I can't get it to work on mobile. The reason you were not seeing the arrows previously was because there was no second List Item content added. Currently- the arrows appear on mobile on homepage, /home2 and on /epcs pages. Link to comment
creedon Posted January 8, 2022 Share Posted January 8, 2022 (edited) @Ekin I have updated my code post. There are also some variations that you can do on the code. It can be made to effect all carousels on a single page. <style> /* desktop */ .user-items-list-banner-slideshow .arrow-container, /* mobile */ .user-items-list-banner-slideshow .mobile-arrows { display : none; } </style> For a site wide effect. Add the following to Design > Custom CSS. /* desktop */ .user-items-list-banner-slideshow .arrow-container, /* mobile */ .user-items-list-banner-slideshow .mobile-arrows { display : none; } Let us know how it goes. Edited January 8, 2022 by creedon tuanphan 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Ekin Posted January 8, 2022 Share Posted January 8, 2022 18 minutes ago, creedon said: @Ekin I have updated my code post. There are also some variations that you can do on the code. It can be made to effect all carousels on a single page. <style> /* desktop */ .user-items-list-banner-slideshow .arrow-container, /* mobile */ .user-items-list-banner-slideshow .mobile-arrows { display : none; } </style> For a site wide effect. /* desktop */ .user-items-list-banner-slideshow .arrow-container, /* mobile */ .user-items-list-banner-slideshow .mobile-arrows { display : none; } Let us know how it goes. This works great, thank you again!! creedon 1 Link to comment
kellyhuffs Posted February 7, 2022 Share Posted February 7, 2022 I've seen others ask if you can add the functionality of the slideshow to loop back after the last slide - did you ever add that to the code? I have your code installed on the site I'm working on and it looks great, just need it to loop back around at the end. Here's the site: https://www.dmelv.com/. Thanks! Link to comment
creedon Posted February 12, 2022 Share Posted February 12, 2022 On 2/7/2022 at 1:03 PM, kellyhuffs said: did you ever add that to the code? I have not added that feature in. I have tinkered with some code but there are some subtleties in how the images are being manipulated that, so far, I've not replicated. Have you considered using the Infinite Scroll feature. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
creedon Posted February 18, 2022 Share Posted February 18, 2022 I have updated the code cited in my July 20, 2021 post earlier in this thread. The code now works for slideshow banner and carousel auto layouts with no arrows. sfphotogirl 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
ruthob93 Posted October 4 Share Posted October 4 Hi @creedon I can't seem to get code to work - any chance you could take a look? I've checked as well in an incognito window. I'm sure I must have missed something in the installation of the code. I'm not really very used to working with Java Script. Its https://www.broadlough.ie/single-casks Thanks so much Ruth Link to comment
creedon Posted October 4 Share Posted October 4 8 hours ago, ruthob93 said: I'm sure I must have missed something in the installation of the code. You missed installing the following at Settings > Developer Tools > Code Injection > HEADER from the install steps. <x-twc-alraac data-click-interval-seconds="6" data-kill-upon-user-action="true"/> There are other settings detailed in the Install steps that can be used instead of the above configuration. It all just depends on what you want to accomplish. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
ruthob93 Posted October 5 Share Posted October 5 @creedon thank you so much for pointing that out. I really appreciate it! creedon 1 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