Am Donnerstag, 25. Mai 2006 20:19 schrieb Martinez, Andrew:
[...]

> Either way, if you use CSS to hide an item by default, you will have to
> unhide it with JS the first time to properly use toggle. I just always use
> element.style.display ="dispVal" and avoid this problem. Rarely is there a
> situation where a toggle function works better.

Thanks for all your answers. Basically i don't want to use dynamicCSS.js. I'd 
appreciate to handle the following situations completely with Prototype 
(without document.write and the flickering caused by the onload event if the 
elements are hidden by default):

1)
<div id='foo'>foo</div>
- If JavaScript is enabled "foo" is shown.
- If JavaScript is disabled "foo" is hidden.

2)
<div id='foo'>foo</div>
<a id='bar'>bar</a>
- If JavaScript is enabled "foo" is hidden and can be toggled via "bar".
- If JavaScript is disabled "foo" is shown and bar is hidden.

Is there an easy way to do this in Prototype?

Best Regards,
Dirk Eschler

-- 
Dirk Eschler <mailto:[EMAIL PROTECTED]>
http://www.krusader.org
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to