Consider the page as below (pseudocode)
.fadeOut() finishes with a display: none;
, if you don't want to do that, use .fadeTo() instead (which won't set display
at the end), like this:
$("header").delay(5000).fadeTo(2000, 0);
(note this uses the built-in .delay() function)
You can try out a full demo here, with the hover functionality fading and not causing movement as well, like this:
$("header").hover(function() {
$(this).fadeTo(600, 1);
}, function() {
$(this).fadeTo(600, 0);
});