I have here a simple jQuery example wherein an element should be hidden. But the following code does not work:
<html>
<head>
<script src="../lib/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#test').hide();
}
</script>
</head>
<body>
<div id="test">Hi</div>
I'm here
</body>
</html>
I added the ready function but it still doesn’t work. What I’m missing?
You are missing a
);at the end, it’s that simple.Should read: