I’m trying to make some divs fadeOut and then be removed.
$("article.articles .thumb a").click(function() {
$(this).parent().parent().addClass("selected");
$("article.post").not(".selected").fadeOut(500).delay(1500).remove();
$('#stream').isotope('reLayout');
});
But the divs are removed right away without fading.
What am I doing wrong?
you can use
fadeOut()callback function which is executed after fade effect is complete.or: