I have a dialog on a website im working on that im trying to get working by doing the following.
Its build using .append() waits 5 seconds then fadeout() and remove(). I wrote the following but it doesnt seem to work.
html
<div class="addAddressDialog"></div>
<div class="overlay"></div>
js
$(".addAddressDialog").append("<span> Thank you </span>")
.delay(5000)
.queue(function(next){
$('.addAddressDialog, .overlay').fadeOut('fast',function(){$(this).remove()});
});
Updated fiddle – http://jsfiddle.net/pAzyc/2/
Don’t call
removein callback function