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 just found one thing. If you want to have some elements on your webpage that appear and disapear and you want some of them to be hidden at the load of your page, don’t use something like :

    <style>
    #mystuff {
    display : none;
    }
    </style>
    


    This code will disable the effects on that block. Instead add an onload event to the body of your page and call a function like that :

    <head>
    <!-- Include Prototype and Scriptaculous -->
    <script type="text/javascript>
    
    function hidestuff() {
    Element.hide('ElementName1');
    Element.hide('ElementName2');
    // etc...
    }
    
    </script>
    </head>
    <body onload="hidestuff();">
    ....
    


    Hope that helps someone : I got stuck with that for a week, having to start with a displayed empty element instead of an hidden element.

    bye,

    Blaise
      Blaise Bernier

      www.medialdesign.com - Solutions for small business, hosting, design and more!
      • 2762
      • 1,198 Posts
      mmm, dont’t know if I really understand, but if you use :

      <style>
      #mystuff {
      display : none;
      }
      </style>


      inside the .css file dosn’t work - you need to use something like this:
      <div id="hiddendivname" style="display: none;">

      insede your html code.

      Than you can make it appear with:
      Effect.Appear(’hiddendivname’);
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 11413
        • 203 Posts
        simply??? Naahhh! Anyway... I put it all in a JS file, so it’s hidden :p
          Blaise Bernier

          www.medialdesign.com - Solutions for small business, hosting, design and more!
        • You can set the initial style from an init() javascript function that is run on page load. This way those with no javascript for whatever reason will see everything. It may not be pretty and fancy, but the page will still work for them, while those with javascript will get all your fancy eye candy and bells and whistles.
            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
            • 11413
            • 203 Posts
            I havent thought about that, but i think it’s nicer to have it done in JScript
              Blaise Bernier

              www.medialdesign.com - Solutions for small business, hosting, design and more!