Jump to content

Carousel to Autoplay

Recommended Posts

  • Replies 6
  • Views 865
  • Created
  • Last Reply

Top Posters In This Topic

Try adding to Last Line in 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, tweak some by tuanphan
      
      */
      
    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>
	
	// Them category class vao post thuoc ve mot category nhat dinh trong SS 7.1. 
	<script>
  $(document).ready(function() {
    $('a.blog-item-category.blog-item-category--Samarbete').parent().parent().parent().parent().addClass('samarbete');
});
</script>

 

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
13 hours ago, tuanphan said:

Try adding to Last Line in 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, tweak some by tuanphan
      
      */
      
    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>
	
	// Them category class vao post thuoc ve mot category nhat dinh trong SS 7.1. 
	<script>
  $(document).ready(function() {
    $('a.blog-item-category.blog-item-category--Samarbete').parent().parent().parent().parent().addClass('samarbete');
});
</script>

 

Hello,

This doesn't seem to work, nothing changes

Link to comment
21 hours ago, michaelpga said:

Hello,

This doesn't seem to work, nothing changes

Try adding this new code into Last Line in Code Injection > Footer

<script>

  $( ( ) => {
  
    /*
    
      this code by Creedon SS forum, tweak some by tuanphan
      
      */
      
    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>
	
	// Them category class vao post thuoc ve mot category nhat dinh trong SS 7.1. 
	<script>
  $(document).ready(function() {
    $('a.blog-item-category.blog-item-category--Samarbete').parent().parent().parent().parent().addClass('samarbete');
});
</script>

 

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
18 hours ago, tuanphan said:

Try adding this new code into Last Line in Code Injection > Footer

<script>

  $( ( ) => {
  
    /*
    
      this code by Creedon SS forum, tweak some by tuanphan
      
      */
      
    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>
	
	// Them category class vao post thuoc ve mot category nhat dinh trong SS 7.1. 
	<script>
  $(document).ready(function() {
    $('a.blog-item-category.blog-item-category--Samarbete').parent().parent().parent().parent().addClass('samarbete');
});
</script>

 

Hello, still nothing changes. Is there another way to make this carousel auto-scroll?

Link to comment
On 11/20/2021 at 10:21 AM, michaelpga said:

Hello, still nothing changes. Is there another way to make this carousel auto-scroll?

ah, sorry, missing class name. Remove above code & add this new code

<script>
  $( ( ) => {
  
    /*

      this code by Creedon SS forum, tweak some by tuanphan

      */
      
    const clickIntervalSeconds = 2;
    
    // do not change anything below, there be the borg here
    
    if ( window.frameElement !== null ) return; // bail if in Preview
    
    const selector = '.user-items-list-carousel__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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
1 hour ago, tuanphan said:

ah, sorry, missing class name. Remove above code & add this new code

<script>
  $( ( ) => {
  
    /*

      this code by Creedon SS forum, tweak some by tuanphan

      */
      
    const clickIntervalSeconds = 2;
    
    // do not change anything below, there be the borg here
    
    if ( window.frameElement !== null ) return; // bail if in Preview
    
    const selector = '.user-items-list-carousel__arrow-button--right';
    
    const $button = $( selector );
    
    if ( ! $button.length ) return; // bail if no button
    
    const click = ( ) => {
    
      $button.click ( );
      
      }
      
    setInterval ( click, clickIntervalSeconds * 1000 );
    
    } );
    
</script>

 

Thank you, not the panel is scrolling but it's scrolling backwards, not forwards. Can we change the code so that the logo move along to right of the screen instead please? Thank you so much!

Link to comment

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.