Reputation: 1520
I append a div with a overlay effect like this:
$("body").append('<div class="overlay-white"><div>')
The overlay-white class. Have this css:
position : absolute;
top : 0;
left : 0;
width : 100%;
height : 100%;
z-index : 500;
background : url(../img/backgrounds/bg-overlay.png) repeat left top;
But now my problem. The overlay pops it now. But how can i fade in the overlay???
Upvotes: 1
Views: 861
Reputation: 91
first you may set the overlay-white
like this display : none;
in css
$("body").append('<div class="overlay-white"><div>')
then do like this .. $('.overlay-white').fadeIn();
hopefully help .
Upvotes: 0
Reputation: 16933
$("body").append('<div class="overlay-white"><div>');
$('.overlay-white').fadeIn();
Upvotes: 0
Reputation: 8701
var overlay = $('<div class="overlay-white"><div>');
overlay.hide().appendTo("body").fadeIn();
Upvotes: 4