how to stop jquery imageslider on mouse hover

后端 未结 4 1118
醉梦人生
醉梦人生 2021-01-16 03:40

this is my website demo : http://daplonline.in/index5.php

i got this jquery from : http://designm.ag/tutorials/image-rotator-css-jquery/

i want to stop slide

4条回答
  •  别那么骄傲
    2021-01-16 04:13

    Add this code at the end of your script.. I guess the mouse-over will pause the slider but i m not sure if the mouseout works or not.. Just give it a try and let me know about the result.

    $('.main_image').on("mouseover",function(){
    clearInterval(intervalID);
    });
    
    $('.main_image').on("mouseout",function(){
    intervalID = setInterval(cycleImage, slidetime);
    });
    

    Adding the above lines will make the code as below:

        
    

提交回复
热议问题