Background image first preload then fadein?
Hi everyone,
When I go to my website I want it to first load the background image fully and not show yet, ones done fully loading I just want it to fade in slowly.
I tried something like this:
- $(".background").load(function(e){
- $(".background").fadeIn(1000);
- });
And I tried something like this:
- $('.achtergrond', this).fadeIn("slow");
Both in document ready function.
The HTML I'm using is:
- <div align="center"><img class="background" src="images/background.jpg"></div>
The CSS I'm using is:
- .background {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: -5000;
- display:none;
- }
Hopefully someone is able to help me out