-
- 203 Posts
I was building my page animation with script aculous and it was working pretty well in FF when I decided to test it in IE... Ouch!
Everything was screwed : elements that I was hiding just before starting the animation flashed on the screen before the animation started or simply stayed there and visible. I found that quick thing 5 minutes ago and it makes things perfect in IE and FF (and it’s even better now in FF).
When you want some of your stuff to start hidden (so you can use effects like ’BlindDown’, ’Appear’ or ’Grow’), simply put that line just after the element opening tag :
<div id="thisdivishidden">
<script type="text/javascript">Element.hide('thisdivishidden');</script>
...
...
</div>
It makes thing hidden both in IE and FF and avoid flashing (that also happen in FF when the bandwidth is low).
Hope it helps someone!
bye,
Blaise
Blaise Bernier
www.medialdesign.com - Solutions for small business, hosting, design and more!
But if you set the style inline, then a user with Javascript turned off (or unavailable) cannot use your page, unless they can also turn off CSS. Unobtrusive Javascript always starts with a functional, if not fancy/pretty, page then adds your Javascript "goodies".
-
- 7,075 Posts
Garry just tipped me about this : exactly what I was looking for, thanks !
I had tried to use something like <div id="thisdivhidden" onload="Element.hide(’thisdivhidden’);> but it didn’t work...
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id