I am using this code to make a certain div (#extras) fade out.
$(document).ready(function() {
for(var i = 1; i <= pageLimit; i++) {
$('body').append('<div id="page' + i + '" name="page' + i + '" class="touch"></ div>' );
}
$('body').append('<div id="extras" class="showUp">..all content needed goes in heree...</div>');
$(window).load(function() {
$('div#extras').delay(100).fadeOut(4000);
});
});
CSS:
div#extras {
height:100%;
}
&
body > div.showUp {
display: block !important;
height:100%;
}
It fades out nicely, but then pops back up once its done the fading animation. How would I make it stay faded? In another function I will have it fade back in.
This is the defaulted css I have from the JQtouch sample I have been working on..
body > * {
background: transparent;
-webkit-backface-visibility: hidden;
display: none;
position: absolute;
left: 0;
text-align:center;
width: 100%;
-webkit-transform: translate3d(0,0,0) rotate(0) scale(1);
height: 100% !important;
}
Thanks!
Would the fact that the extras div was inserted into the page by the .append() function have anything to do with making it pop back up?