My question is simple yet I can't figure out how, I have this two divs,
<div id="text1">
...
</div>
<div id="text2">
...
</div>
I need a javascript function to toggle between these two divs.
first load div 1 -- wait 10 seconds -- then load div 2,(hide Div 1) -- wait 10 seconds --> then load div 1,(hide Div 2) -- wait 10 seconds -- then load div 2,(hide Div 1)
like wise pattern should continue. I am newbie to Javascript so detailed explanation would be appriciated. Thanks.
UPDATE
This is what i have done so far,
AnimateBannerTeks();
function AnimateBannerTeks() {
$('#text1').removeClass('animated fadeInUp').fadeOut('fast');
$('#text1').hide();
$('#text2').addClass('animated fadeInUp').fadeIn('fast');
$('#text2').show();
dodelay();
AnimateBannerTeks1();
}
function AnimateBannerTeks1() {
$('#text2').removeClass('animated fadeInUp').fadeOut('fast');
$('#text2').hide();
$('#text1').addClass('animated fadeInUp').fadeIn('fast');
$('#text1').show();
dodelay();
AnimateBannerTeks();
}
function dodelay(){
setTimeout(function(){return true;},60000);
}