Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7029799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:35:08+00:00 2026-05-28T00:35:08+00:00

Not sure if this is possible but I have a slideshow on my site

  • 0

Not sure if this is possible but I have a slideshow on my site that when a button is click the relevant slide, slides in.

What I want to do is add a timer so that after 3 seconds the next button is clicked, making my slideshow slide automatically.

$('#button a').click(function(){
    var integer = $(this).attr('rel');
    $('#myslide .cover').animate({left:-720*(parseInt(integer)-1)})  /*----- Width of div mystuff (here 160) ------ */
    $('#button a').each(function(){
    $(this).removeClass('active');
        if($(this).hasClass('button'+integer)){
            $(this).addClass('active')}
    });


});

Ive added a Fiddle…
http://jsfiddle.net/5jVtK/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:35:09+00:00Added an answer on May 28, 2026 at 12:35 am

    The simplest way to do this is to use setTimeout (happens once after a delay) or setInterval (happens every so often).

    setTimeout( function() { $( '#button a' ).trigger( 'click' ) }, 3000 );

    setInterval( function() { $( '#button a' ).trigger( 'click' ) }, 3000 );

    Once you get this implemented, you may want to think about some other niceties, such as stopping the automatic progression when the user’s mouse is over the next button or over the slideshow (since that implies interest in what is currently displayed) and resuming the autoadvance on mouseout.

    Next: it sounds like you need to figure out how to dynamically find the correct button to trigger to keep advancing through multiple slides. This is one way to do it:

    `

    function click() {
        // Find the button for the next slide in relationship to the currently active button
        var $next = $( '#button' ).find( '.active' ).next( 'a' );
    
        // If there isn't one, go to the beginning
        if ( ! $next.length ) {
            $next = $( '#button' ).find( 'a' ).first();
        }
    
        // Trigger the click
        $next.trigger( 'click' );
    
        setTimeout(click, 3000);
    }
    
    setTimeout(click, 3000);
    

    Here’s a link to a fiddle showing this in action:

    http://jsfiddle.net/5jVtK/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure if this is possible (complete non-flash developer speaking), but we have
I'm not sure if this is possible but I want to see objects created
Not sure this is possible, but looking to write a script that would return
I am not sure how this is possible but I have a for loop
I'm not sure if this is even possible but here goes: Currently I have
Not sure if this is possible, but I have a field in a table
This may not be possible, but I have a DIV that I am transforming
I am not sure if this is possible, but I have this scenario. I
I'm not sure if this is possible, but if I have a directory with
Hi not sure if this is possible or not but I want to programaticaly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.