Reputation: 75
$(window).load(function() {
$(".screenLoading").fadeOut('slow');
})
setInterval("loadCont()", 500);
//Loaded
function loadCont(){
$('.container').fadeIn('slow');
return;
}
function loadLogin() {
$('.container').fadeOut('slow', function() {
$('.log').fadeIn('slow');
});
}
I have the javscript code above and am trying to mimic the effect at http://orinukas.com/SoduBendrija/ .
When I click on the right upper link named 'Nariams', the content with headings and paragraph should fade out and the Sign Up form should fade in.
When I click on that link, content fades, sign up form fades in and content fades in too.
I don't want content to fade in.
Upvotes: 0
Views: 139
Reputation: 1934
I have gone through the code which you pasted in http://pastebin.com/gQC5MBWL . i found one issue in this you are using
setInterval("loadCont()", 500);
//Loaded
function loadCont(){
$('.container').fadeIn('slow');
return;
}
setInterval is calling itself again and again(this will show the content again if you will hide it) so remove this or use setTimeout instead of using setInterval.
Thanks
Upvotes: 1
Reputation: 37
Replace the below code with you loadLogin function. This should work as wanted.
function loadLogin() {
$('.container').fadeOut('slow');
$('.log').fadeIn('slow');
}
Upvotes: 0