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

  • SEARCH
  • Home
  • 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 3433322
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:33:34+00:00 2026-05-18T07:33:34+00:00

This is the slideshow that we used: http://www.littlewebthings.com/projects/blinds/ and this is the JS file:

  • 0

This is the slideshow that we used:

http://www.littlewebthings.com/projects/blinds/

and this is the JS file:

http://www.littlewebthings.com/projects/blinds/js/jquery.blinds-0.9.js

However, this slideshow doesn’t have a setting that makes it go through each image automatically. You still have to click on the numbers below it to see the images. Does anybody know what to add into the javascript code to make it go through each image automatically?

Thanks!

  • 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-18T07:33:35+00:00Added an answer on May 18, 2026 at 7:33 am

    This solution uses closures and recursion.

    var SlideChanger = function(seconds_each) {
      var index = -1; 
      // on the first cycle, index will be set to zero below
      var maxindex = ($(".change_link").length) - 1; 
      // how many total slides are there (count the slide buttons)
      var timer = function() { 
      // this is the function returned by SlideChanger
        var logic = function() { 
        // this is an inner function which uses the 
        // enclosed values (index and maxindex) to cycle through the slides
          if (index == maxindex) 
            index = 0; // reset to first slide
          else
            index++; // goto next slide, set index to zero on first cycle
          $('.slideshow').blinds_change(index); // this is what changes the slide
          setTimeout(logic, 1000 * seconds_each); 
          // schedule ourself to run in the future
        }
        logic(); // get the ball rolling
      }
      return timer; // give caller the function
    }
    
    SlideChanger(5)(); // get the function at five seconds per slide and run it
    

    What we are doing here is exposing the inner function timer outside of the function in which it was defined (SlideChanger). This function (timer) has access to the variables defined inside of SlideChanger (index and maxindex).

    Now that we have set up the variables in the enclosing environment and a function to return to the caller, we can set up the logical engine in logic. When logic is run, it uses index and maxindex to determine which slide should be shown next, shows the slide, and schedules itself to be run again in the future.

    When called, the returning function calls logic to get the ball rolling. Then logic repeats indefinitely by scheduling itself to run in the future each time it is run.

    So, to summarize, we call SlideChanger with a numeric argument x. It returns a function that, after being called, will change the slide every x seconds.

    Another way to write the same concept.

    (function(seconds_each) {
      var index = -1; 
      // on the first cycle, index will be set to zero below
      var maxindex = ($(".change_link").length) - 1; 
      // how many total slides are there (count the slide buttons)
      return function() { 
      // this is the function returned by SlideChanger
        var logic = function() { 
        // this is an inner function which uses the 
        // enclosed values (index and maxindex) to cycle through the slides
          if (index == maxindex) 
            index = 0; // reset to first slide
          else
            index++; // goto next slide, set index to zero on first cycle
          $('.slideshow').blinds_change(index); // this is what changes the slide
          setTimeout(logic, 1000 * seconds_each); 
          // schedule ourself to run in the future
        }
        logic(); // get the ball rolling
      }
    })(5)(); // get the function at five seconds per slide and run it
    

    JavaScript is a nice language with many functional programming constructs such as higher order functions (functions that either create functions or accept functions as parameters) and anonymous functions. For more info see http://www.ibm.com/developerworks/web/library/wa-javascript.html

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

Sidebar

Related Questions

Look at this slideshow (wait a few seconds): http://www.tumblr.com I'm looking for a jQuery
I need something like this http://jonraasch.com/blog/a-simple-jquery-slideshow but w/o the absolute positioning. Is it possible?
like in this site: http://www.1stwebdesigner.com/resources/57-free-image-gallery-slideshow-and-lightbox-solutions/ it only loads the image when you are rally
So I have a javascript library setup on http://www.topholidayrecipes.com/crockpot-chicken-recipes.html and this page uses fancy
Imagine a slideshow looks similar to this: http://malsup.com/jquery/cycle/div.html except it has only two images
Well, I have this jQuery image slideshow that uses the attribute control inside an
This is the gallery I've been asked to implement http://sandbox.leigeber.com/slideshow/ I've chopped and changed
I've got an odd little dilemma in this jQuery slideshow plugin that I am
Right now, we have a slideshow of images that uses javascript. However, when the
I have this slideshow with a overlay that pops up on hover, you can

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.