2

Having trouble with jquery cycle not sure what am i doing wrong. Without delay it all works fine, but I would love to delay the first image because the slider starts before the first image or two are loaded I would love to stop it for few seconds and then start. ANY IDEAS ?

$(document).ready(function() {  $('#slideshow').cycle({ 
      fx: 'fade',
      speed: '1000',
      timeout:'4000',
      delay: '1000'
    });
});
Niks Jain
  • 1,617
  • 5
  • 27
  • 53
  • Can you show us a fiddle? – aIKid Oct 12 '13 at 05:04
  • No need for a delay, just use `$(window).load(function() {$('#slideshow').cycle...`. Also see http://stackoverflow.com/questions/3698200/window-onload-vs-document-ready – Maksida Oct 12 '13 at 05:05
  • this actually worked, but now all of the images are showing up at the beginning of the slideshow, need to fix that, and it's all good :) – user2862712 Oct 12 '13 at 09:28
  • #slideshow img { display: none } #slideshow img.first { display: block } it works but only first image shows up. I need the rest of the images to show 10 sec after the page first image shows Any ideas ?
    – user2862712 Oct 12 '13 at 10:21

1 Answers1

1

if you wanted a 4 second interval between transitions but you want the first transition to occur 2 seconds after the page loads then you would do this:

$('#slideshow').cycle({
fx: 'fade',
speed: '1000', 
 timeout:'4000',
delay: -2000
});

The 'delay' option gives you an opportunity to change the transition interval of the very first slide. When the timeout value of the first slide is calculated, the value of the delay option (default is 0) is added to the timeout value

Hope it helps

  • thanks for the answer, this method is working if delay number is negative however when i put positive delay ex( '2000') slideshow loads and stops never passing the first image. not sure why ? – user2862712 Oct 12 '13 at 09:31
  • what I'm actually looking for is 4 second intervals between transitions and first transition to occur 9 seconds after the page loads. I tried adding delay '-9000' it was too fast, then i tried '9000' and everything just stopped :( – user2862712 Oct 12 '13 at 09:43
  • its all fine now delay: 5000 instead of delay:'5000' thanks :) – user2862712 Oct 12 '13 at 10:47
  • you mean -5000? and do not forget to accept answer if you find it usefull – Dhruma Mehta Oct 12 '13 at 13:52