I have a very simple jquery test page and I can’t seem to get even the basics to work.
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type=”text/javascript”>
$(function(){
alert('hi');
});
</script>
</head>
<body>
This is a test
</body>
</html>
Basically, I just want an alert box to pop up when the page is ready.
There are no errors on the page but the alert box doesn’t show up. This seems to be a very, very simple page to me so I’m not sure what I’m missing. Does anyone have any ideas?
Couple of possible problems: missing
DOCTYPEand wrong quotes aroundtypeattribute of thescripttag.Try this: