NOT exactly the same, but the approach you should follow would be the same...

This was posted just today by the author:

http://subtlegradient.com/articles/2008/10/20/mootools-default-to-hide-fade-later

The idea is to get everything hidden via CSS, the do the rest... the
only problem, is how to degrade if no javascript enabled... but
anyways, the accordions wouldnt work anyway....


On Mon, Oct 20, 2008 at 2:57 PM, Sapslabs <[EMAIL PROTECTED]> wrote:
>
> I have this code executed on the domready function
>
> window.addEvent('domready', function() {
>
>        var fx = [];
>        $$('.contentholder').each(function(item, index){
>                var index = fx.length;
>                myid = item.id;
>
>                fx[myid] = new Fx.Slide(item.id);
>                fx[myid].hide()
>        });
>
>        $$('.acclinks').each(function(item, index){
>                item.addEvent('click', function(el){
>                        myid = item.id;
>                        myid = myid.replace(/_button/g, "_content");
>                        fx[myid].toggle();
>                });
>        });
> });
>
> This will get all the links with the class acclinks and make them
> toggle their specific div. The code works perfectly (is like an
> accordion but each element is independent form one another so that I
> can have any number of them open at one time). The problem is that as
> soon as the page loads, I see all the content and then it quickly gets
> hidden byt the function.
>
> Is there any way to assure that the DOM is loaded, javascript loaded
> and function called, before the rest of the page? I want the page to
> load with everything hidden at once since I don't want the user to see
> the content flash and then disappear.
>
> Thanks
>



-- 
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
Ivanicus' Code Box
http://ivanicus.com/

Reply via email to