I'm writing a small script who, on mouse hover, add class and on mouse leave remove class. Remove must be with delay.
Following script just addClass and don't work on removeClass. I don't get error...
$(".result").hover(
  function () {
    $(this).addClass("current");
  },
  function () {
    setTimeout( function () {
        $(this).removeClass("current");
    }, 800)
  }
);
The same script, but withouth setTimeout, work...
$(".result").hover(
  function () {
    $(this).addClass("current");
  },
  function () {
    $(this).removeClass("current");
  }
);
Can anyone help me?
Thanks!
 
    