Search code examples
mouseoverfadeout

Its sure its simple but i cant make my fading div stop on mouseover


ok im really a beginner when it comes to this but im trying to get this JS

$(document).ready(function(){
setTimeout(function(){
$("div.left-col-wrap-outer").fadeOut("slow", function () {
$("div.left-col-wrap-outer").remove();
  });

}, 9000);


});

to stop the animation/fade out after 9 seconds with a mouseover then to restart the 9 sec timer on mouseoff.

Any help really appeciated


Solution

  • $(document).ready(function(e){
       $("div.left-col-wrap-outer").mouseleave(function(e){
           $("div.left-col-wrap-outer").fadeOut("slow");
    });
    });
    

    do you want this?