I have 2 Divs stacked on top of each other.
I need a really simple function that will:
a) Wait for 3 seconds and then b) FadeOut the top Div to reveal the se
This attempt uses a small cookbook function wait from jquery.com.
The function doFading assumes the id of the top div to be "a4".
function doFading() {
$("#a4").wait(3000)
.fadeOut("slow")
.wait(3000)
.fadeIn("slow",doFading);
}
$.fn.wait = function(time, type) {
time = time || 1000;
type = type || "fx";
return this.queue(type, function() {
var self = this;
setTimeout(function() {
$(self).dequeue();
}, time);
});
};