Of course, Firefox and IE handle these differently. Firefox supports the CSS3 style "opacity", which takes a value between 0 and 1, as in the following example:
<div style="opacity: 0.2;"></div> <div style="opacity: 0.4;"></div> <div style="opacity: 0.6;"></div> <div style="opacity: 0.8;"></div> <div style="opacity: 1;"></div>
Of course, IE doesn't support this. Instead, you need to use something called an alpha filter. The syntax for this is as follows:
<div style="filter: alpha(opacity=20);"></div> <div style="filter: alpha(opacity=40);"></div> <div style="filter: alpha(opacity=60);"></div> <div style="filter: alpha(opacity=80);"></div> <div style="filter: alpha(opacity=100);"></div>
This takes values between 0 and 100, as you can see in the example. One really quirky thing about the IE alpha filter is that it doesn't work unless you have a width specified. Go figure! It took me quite a while to discover why my code wasn't working, when I'd written it exactly the same way as the example I found online. Nothing I read mentioned this little anomaly. But when I added a width to the style, suddenly it worked. Typical IE quirkiness, I guess.
The trick here is that it executes the next line of code immediately following the setTimeout statement. So, if you want the system to wait before it does something else, the setTimeout needs to be the last statement in your function, and the function that you call needs to be responsible for calling the next action. Therefore, I load the entry, then fade in. The fade in function is responsible for calling the fade out function after displaying the entry for the desired interval. Then the fade out function is responsible for loading the next entry, and calling fade in again.
Feel free to look at the source code if you'd like more detail.
Also, I happened to be listening to internet radio while I was working on this. I was viewing my results over some beautiful piano music, and it was so nice... I think I may record something pretty to play in the background as you're viewing this page.
I think I might combine the Scripture, Quotes, and Reflections and present them all in this fashion.