fadeout et supprime un élément après quelques secondes

Pourquoi l'élément ne peut pas être supprimé dans le rappel de $.fadeout?

Par exemple,

$(".background-blackout").fadeOut('slow', function(){
    //Remove all the layer.
        $(this).remove();
}));


alert($('.background-blackout').length);
//return 1

Cela fonctionne sans le rappel,

$(".background-blackout").fadeOut('slow', function(){

}).remove();

alert($('.background-blackout').length);
//return 0.

Mais elle supprime l'élément avant de l'élément a entièrement disparu. Donc, je pense que je dois appeler l' remove() après quelques secondes?

Alors, comment puis-je faire avec remove()?

J'ai essayé avec cela, mais la couche ne sera pas supprimé,

$(".background-blackout").fadeOut('slow', function(){
});


setTimeout(function(){
    $(".background-blackout").remove(); 
},2000);


alert($('.background-blackout').length);
//returns 1.

source d'informationauteur laukok