swdean wrote:
> I am quite new to coding and I am trying to show div in case js is
> disabled
> the reason is because I set it to display: none

You should do it completely otherwise.

Show div always, and hide it if javascript is enabled.

<div class="hideOnLoad">
<script type="text/javascript">

document.observe('dom:loaded',function() {
/*dom:loaded event is fired by prototype.js
   when all html is loaded and the DOM tree built,
   but not yet all images and css are loaded */

// invoke method .hide() on all elements with class .hideOnLoad


This way the user should not even notice the div is shown on load,
as it will be hidden by javascript before the page is fully rendered.

Please read about "unobtrusive javascript" to learn more about this 

Best Regards,

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to