Check this plugin out:
One of the demos on that page should give you what you want.
From the site:
Slideshows are not limited to images. You can use any element you want.
Drew Noakes
2010-08-28 10:42:25
Check this plugin out:
One of the demos on that page should give you what you want.
From the site:
Slideshows are not limited to images. You can use any element you want.
you can simply extend jQuery with this functionality:
$.fadeInNext = function(next){
next.fadeIn(function(){
$.fadeInNext($(this).next());
});
}
$.fn.fadeInEach = function(){
this.eq(0).fadeIn(function(){
$.fadeInNext($(this).next());
});
};
$('#fade p').hide().fadeInEach();
This should work. Example
Update:
To fade the new letter in after the pervious one is faded:
$.fadeInNext = function(next) {
next.fadeIn(function() {
$(this).fadeOut(function(){
$.fadeInNext($(this).next());
});
});
}
$.fn.fadeInEach = function() {
this.eq(0).fadeIn(function() {
$(this).fadeOut(function() {
$.fadeInNext($(this).next());
});
});
};
$('#fade p').hide().fadeInEach();
To fade the new letter in while the previous is still fading out:
CSS:
#fade {
position: relative;
}
#fade p {
position: absolute;
}
JavaScript:
$.fadeInNext = function(next) {
next.fadeIn(function() {
$(this).fadeOut();
$.fadeInNext($(this).next());
});
}
$.fn.fadeInEach = function() {
this.eq(0).fadeIn(function() {
$(this).fadeOut();
$.fadeInNext($(this).next());
});
};
$('#fade p').hide().fadeInEach();
Do something like below code,
var delay = 1000;
$(document).ready(function() {
$('#fade p').fadeOut(0).each(function(i) {
$(this).delay(i * delay).fadeIn(1000);
});
});
Demo : http://jsbin.com/oqidi3