This is the first time I am using jQuery. I am loading a large background image and when it is loaded I am fading it in over three seconds. This script works on Firefox and
...
.bgImage {
position: fixed;
top: 0; left: 0;
right: 0; bottom: 0;
z-index: 1;
display: none;
}
$(function() {
var src = '../css/background.jpg';
var ele = $('.bgImage');
var img = $('
', {
src: src
}).hide().appendTo(ele).load(function() {
$(this).remove();
ele.css('background-image', 'url('+src+')').fadeIn(3000);
});
});