JQuery disappears display: no

Why is my jQuery not working. If I replace Out with In and None with Inline, it will fade in order, but it will not fade. Any ideas?

$(this).find(".hover").fadeOut("slow").css({display:"none"});
+5
source share
2 answers

The problem is .css({ display : 'none' }), you do not need this code, as it fadeOutwill hide it after it is completed. Try using this code:

$(this).find(".hover").fadeOut("slow");

Or, if you have a hide ... Try this code (the second parameter of fadeOut is the callback function that executes AFTER fadeOut completes)

$(this).find(".hover").fadeOut("slow", function () {
    $(this).css({display:"none"});
});
+9
source
$(document).ready(function(){
     $(".hover").fadeOut("slow", function(){
              alert("fadeout complete!!!");
     });
});

, . , fadeOut, display none. , .

+1

All Articles