[jQuery] Hiding divs with class
I think I'm missing something fairly fundamental in my understanding
of JQuery.... I'm just trying to hide a collection of DIVs in a page
all with a specific class, however, my code isn't working at all.
I've knocked up a simple page with very little HTML to show my code.
This looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Test Page</title>
<script type="text/javascript" src="http://jquery.com/src/latest/"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$("div.hidethis").hide();
});
</script>
</head>
<body>
<div id="main">
This should be visible.
<div id="hide" class="hidethis">This should be hidden.</div>
</div>
</body>
</html>
--
Tom
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/