-1

I have this jQuery slide show from JQuery Cycle plugin....

<script type="text/javascript">
$(window).on('load', function() {  
    var img_widths = [];
    var imgs = $(".pics").find("img");
    imgs.each(function() {
      img_widths.push($(this).width());
      $(this).attr("width", $(this).width());
    });
});
$('.pics').cycle('fade');
</script>

Its been adjusted a bit, but I was wondering if anyone knew how to make it go fast or slower? adjust the speed, I looked at a tutorial of it on the website of the plug, but it didnt work.

j08691
  • 204,283
  • 31
  • 260
  • 272
user979331
  • 11,039
  • 73
  • 223
  • 418

3 Answers3

2

This takes 1 second to fade, at 8 second intervals...

$(".pics").cycle({
    fx:'fade',
    speed:1000,
    timeout:8000
});
Reinstate Monica Cellio
  • 25,975
  • 6
  • 51
  • 67
0

Update your code to the one bellow, you have to pass options to the cycle command:

<script type="text/javascript">
$(window).on('load', function() {  
    var img_widths = [];
    var imgs = $(".pics").find("img");
    imgs.each(function() {
      img_widths.push($(this).width());
      $(this).attr("width", $(this).width());
    });
});
$('.pics').cycle({
                    fx:     'fade',
                    speed:   1000
                 });
</script>

You can update the speed variable (it uses ms), you've several other options that you can use, i like to use this jquery cycle option reference

Diogo Raminhos
  • 2,023
  • 16
  • 24
0
$('.pics').cycle({
    fx : 'fade',
    speed: 1000
});

Just adjust the speed number.

idrumgood
  • 4,904
  • 19
  • 29