I wan't to have a small section of a web page that occasionally fades
in and out between two div contents.
Here is my first noddy attempt (below).
When I run this in Firefox (3.5.6) the CPU (Core 2 Duo 2.6) idles away
at 1%.
When I run this in IE (8.0) both CPU cores hit 50% during each effect
transition (and the laptop fan comes on).
Any ideas why my implementation is so bad in IE?
Is there a better way to create this transistion effect?
(Btw, I've used prototype b4 but not script.aculo.us)
Cheers,
Sean.
_________________________
<script type="text/javascript">
function MyFade1() {
Effect.Fade('banner1', { duration: 1.0 , delay: 5.0 , afterFinish:
function() { MyAppear2(); }});
}
function MyFade2() {
Effect.Fade('banner2', { duration: 1.0 , delay: 5.0 , afterFinish:
function() { MyAppear1(); }});
}
function MyAppear1() {
Effect.Appear('banner1', { duration: 1.0 , afterFinish: function()
{ MyFade1() }});
}
function MyAppear2() {
Effect.Appear('banner2', { duration: 1.0 , afterFinish: function()
{ MyFade2() }});
}
MyFade1();
</script>
_________________________