I have a div that I set its display to 'none' and becomes visible (on invisible again) when users click on a span that triggers a js function that switches display from 'none' to 'block' and vise versa.

Since this div will remain hidden if javascript is not enabled in the user's browser, I'm looking for a way to have it displayed such case.

What I did is I changed the display to 'block' as default, and added a js function that changes display to 'none' as soon as the page loads (using the onload command in the <body> tag).

The only problem that I have with this method is that the div does show up and only disappears once the page finishes loading. I want it to be completely unnoticeable until the user invokes the function that makes it visible.

Can anyone think of a way to do it?