i would like to scroll the window to the top, pause my animation for 1 second, and then use a fadeOut to erase the content, but this code doesn't work, do you know why?
$('#link').bind('click', function(){
preloading.show();
$('html,body').animate({'scrollTop':0}, 300, function(){
$('#myDiv').setTimeout(function(){
$(this).empty()
.append(conteneurBio).hide()
.fadeIn('slow', function(){
preloading.hide();
});
}, 1000);
});
console.log(this)in the setTimout() callback, just to make sure it is what I think it is.setTimeoutis a global function, not a jQuery method.