We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11413
    • 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!
      • 33337
      • 3,975 Posts
      Zaigham (aka zi) Reply #2, 18 years ago
      Thanks for the tip. It will be helpfull for those who play with script.aculous grin

      regards,

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 9191
        • 20 Posts
        Quote from: grunt_lord at Mar 30, 2006, 09:40 PM

        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

        You can also just set the element to display: none; inline, like so:

        <div id="thisdivishidden" style="display: none;">
        ...
        </div>

        it has to be inline or else it won’t appear when scriptaculous tells it to.
        • 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".
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 6726
            • 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&#39;outil id