There is a bit of a hack that I implemented once. It uses
document.write: if you server proper xhtml (using MIME type
application/xhtml+xml) this won't work (and so it isn't very future
proof)
If you have the visibility of the elements you mentioned set to hidden
(or whatever css properties you want to set if javascript is enabled)
in the css file "extraStyles.css", you can use the following to put
them into the document (as long as it is called from within the head
section of the xhtml page)
document.write('<link rel=\"stylesheet\" type=\"text/css\" href=
\"extraStyles.css\" media=\"screen\">');
By the way this way is dodgey, as I think generally document.write is
generally frowned upon.
Michal.
On Nov 14, 5:35 pm, Jan Kassens <[EMAIL PROTECTED]> wrote:
> to hide the elements earlier than domready you could set visibility to
> hidden in you're css file, but that would hide the elements if
> javascript is disabled.
>
> On Nov 14, 2008, at 16:24, Roope wrote:
>
>
>
>
>
> > I have a fade in effect for my fronpage header and couple of images:
>
> > window.addEvent('domready', function(){
> > var fade = $$('.hotspot', '.heading');
> > fade.each(function(element) {
> > var fadeIn = new Fx.Morph(element, {
> > duration:2400,
> > transition: Fx.Transitions.Quint.easeIn,
> > wait:true
> > });
> > fadeIn.start({'opacity': [0, 1]
> > });
> > });
> > });
>
> > This way images and stuff are visible until element are fully loaded
> > and it looks stupid. Is there better way to do this?
>
> --
> Jan - MooTools comitter
> twitter/blog:http://kassens.net