M
Martin
Hi There,
I'm new to jquery. I'm trying to fadein/fadeout a few divs (each
containing some text). Basically the text from the first div
should appear on the screen, then it should fade out and the second
div should fadein in the same place, and so on.
I've found the following function on the internet:
This is my script.js:
function imageOneFade(){
$('#img1').fadeIn(2000, function(){ setTimeout("$('#img1').fadeOut(2000);
imageTwoFade();",6000); });
}
function imageTwoFade(){
$('#img2').fadeIn(2000, function(){ setTimeout("$('#img2').fadeOut(2000);
imageOneFade();",6000); });
}
and the relevant bit from index.html
$(document).ready(function(){
imageOneFade();
});
The css file hasn't got anything yet. I want to get this animation right
first.
Thank you
Martin
I'm new to jquery. I'm trying to fadein/fadeout a few divs (each
containing some text). Basically the text from the first div
should appear on the screen, then it should fade out and the second
div should fadein in the same place, and so on.
I've found the following function on the internet:
This is my script.js:
function imageOneFade(){
$('#img1').fadeIn(2000, function(){ setTimeout("$('#img1').fadeOut(2000);
imageTwoFade();",6000); });
}
function imageTwoFade(){
$('#img2').fadeIn(2000, function(){ setTimeout("$('#img2').fadeOut(2000);
imageOneFade();",6000); });
}
and the relevant bit from index.html
$(document).ready(function(){
imageOneFade();
});
The css file hasn't got anything yet. I want to get this animation right
first.
Thank you
Martin