javascript - How to autoplay super slider? -
i choose superslider link config on website , it's worked absolutely . have problem it. :( can't start auto play slider. due documentation on mentioned link there options can use start auto play don't know how , there no auto play demo show me how ? code :
<section id="slider"> <div class="row"> <div class="col-lg-12 col-md-12"> <div class="slider_area"> <!-- start super slider --> <div id="slides"> <ul class="slides-container"> <li> <img src="img/slider/2.jpg" alt="img"> <div class="slider_caption"> <h2>title</h2> <p>description</p> <a class="slider_btn" href="#">more</a> </div> </li> <!-- start single slider--> <li> <img src="img/slider/3.jpg" alt="img"> <div class="slider_caption slider_right_caption"> <h2>title</h2> <p>description</p> <a class="slider_btn" href="#">more</a> </div> </li> <!-- start single slider--> <li> <img src="img/slider/4.jpg" alt="img"> <div class="slider_caption"> <h2>title</h2> <p>description</p> <a class="slider_btn" href="#">more</a> </div> </li> </ul> <nav class="slides-navigation"> <a href="#" class="next"></a> <a href="#" class="prev"></a> </nav> </div> </div> </div> </div> </section>
now how can use option auto play slider
$('#slides').superslides(options_hash) delay: 5000 play: true slide_speed: 'normal' slide_easing: 'linear' nav_class: 'slides-navigation' container_class: 'slides-container' pagination: true hashchange: true
thanks :)
use play: 1000
1000-millisecond delay between autoloading slides. use false
disable, number enable.
here example autoplays slides , stops autoplay on hover:
$(function() { $('#slides').superslides({ hashchange: true, play: 2000 }); $('#slides').on('mouseenter', function() { $(this).superslides('stop'); console.log('stopped') }); $('#slides').on('mouseleave', function() { $(this).superslides('start'); console.log('started') }); });
no hover effect:
$(function() { $('#slides').superslides({ hashchange: true, play: 2000 }); });
Comments
Post a Comment