alex
alex

Reputation: 655

How to make a slider autoscroll using jquery

http://405pixels.gowerpowered.com

I have the slider, and I have been trying to figure out how to make the homepage autoslide?

I tried using firebug to locate the files... Located some .js files that contain some information about the homepage slider... but all the changes and everything I make seem to not be working...

This is a free template I found called BigFoot. I am really interested into learning about how this javascript would work that is why I downloaded in the first place... to learn from the template... If you could point me in the right direction that would be awesome.

Thanks, Alex

Upvotes: 0

Views: 1553

Answers (2)

Code wrangler
Code wrangler

Reputation: 134

you are using flex slider so you can use the code below.

jQuery(window).load(function() {
    jQuery('.flexslider').flexslider( {
    pauseOnHover: true,
        slideshow: false,
        controlsContainer: ".flex-container"
    } );
} );

actually this it the param you need to pass to make slider autostart

slideshow: false,

Let me know if you run into any other issues.

Upvotes: 0

Deryck
Deryck

Reputation: 7668

You'll need to replace the actual photo swapping code with whatever you use but the rest will swap out each picture every 5 seconds.

$(document).ready(function() {
  var next = $('#right-button');

  next.click(function() {
    $('#current-picture').fadeOut('fast');
    $('#next-picture').fadeIn('fast');
    ...whatever code you use for this.
  });

  var scroll = setInterval(function() {
    next.trigger("click");
    if(picture is last) {
      clearInterval(scroll);
    }
  }, 5000);
});

Upvotes: 1

Related Questions