Javascript Image Slider / Posts /

Do not start the image slider until it is hovered

4
Hi, how can I set the autostart the slider when I open a site, always needs to mouseover the image and only after that will the slider start. please help
kristian1410  10 years ago   viewed: 3523    

1 Answer

0

Menucool image slide will auto start if you have set {autoAdvance: true} in the js-image-slider.js.

So we have to set it to { autoAdvance: false, }.

Then this option should be changed once the slider is hovered. To accomplish this, we can add the script below to the page using the slider's built-in functions that are listed in the image slider demo 4:

<script> var flag = true; document.getElementById("slider").onmouseover=function() { if(myFlag) { imageSlider.changeOptions({autoAdvance: true}); flag = false; //if you need the scrolling immediately, add: imageSlider.next(); } } </script>
Milan   10 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: