Search code examples
phpjquerymouseoverslidedownslideup

I need stop slideUp in jquery


i write this code , it make a slideUp for me now I need when mouse over stop slide up regard

$(document).ready(function () {
$('#ticker_02').mouseover(function() {
  //I NEED THIS CODE
    })

});

function tick2(){
    $('#ticker_02 li:first').slideUp( function () { $(this).appendTo($('#ticker_02')).slideDown(); });
}
setInterval(function(){ tick2 () }, 2000);

Solution

  • try stop() method:

    $('#ticker_02').mouseover(function() {
      $(this).stop(true);
    })