How to make the jquery play automatically?

I have a question about my slideshow, i want it to play automatically, how to do it???

i've already changed the autoplay setting from false to true, but still cant.

here is my code:

 <script>
  jQuery(document).ready(function($) {
  $('#full-width-slider').royalSlider({
    arrowsNav: true,
    loop: true,
    keyboardNavEnabled: true,
    controlsInside: false,
    imageScaleMode: 'fill',
    arrowsNavAutoHide: false,
    autoScaleSlider: true, 
    autoScaleSliderWidth: 960,     
    autoScaleSliderHeight: 350,
    controlNavigation: 'bullets',
    thumbsFitInViewport: false,
    navigateByClick: true,
    startSlideId: 0,
    autoPlay: true,
    transitionType:'move',
    globalCaption: true
  });
});

</script>

and here is my link if you need to read the jquery file

My Slider problem link

THANKS

Upvotes: 1

Views: 12830

Answers (2)

Sebastian.Belczyk
Sebastian.Belczyk

Reputation: 885

AutoPlay property requires an object not true\flase value, look at doc

Try this code:

 <script>
  jQuery(document).ready(function($) {
  $('#full-width-slider').royalSlider({
    arrowsNav: true,
    loop: true,
    keyboardNavEnabled: true,
    controlsInside: false,
    imageScaleMode: 'fill',
    arrowsNavAutoHide: false,
    autoScaleSlider: true, 
    autoScaleSliderWidth: 960,     
    autoScaleSliderHeight: 350,
    controlNavigation: 'bullets',
    thumbsFitInViewport: false,
    navigateByClick: true,
    startSlideId: 0,
    autoPlay:  {
            // autoplay options go gere
                enabled: true,
            pauseOnHover: true
               }
  });
});

Edit: "}" was missing after " pauseOnHover: true" .

Upvotes: 0

user1028286
user1028286

Reputation:

Try this,

autoPlay: {
   enabled: true,
   delay: 1500
}

Change the delay according to your requirement.

Or just try,

autoPlay : {
     enabled : true
}

Upvotes: 3

Related Questions