
Originally Posted by
EricWatson
Thank you so much. You wouldn't happen to know how it should look would you if I wanted jquery to hide the image first then show it 5 seconds after page load? That way I can get rid of the CSS display none and degrade well. Thanks!
The way I often take care of that is by placing a class on the <html> element called "no-js", then in the <head> you can add some JS that adds a "js" class. This way you can target JS dependant things in your CSS.
e.g. something like this:
HTML Code:
<html class="no-js">
<head>
...
...
<script src="jquery.js"></script>
<script>
$("html.no-js").attr("class", "js");
</script>
</head>
...
Then in your CSS:
Code css:
#paint {
/* normal CSS styles */
}
.js #paint { /* JS dependant styles */
display:none;
}
Bookmarks