I’ve added in an “.aspx” page some JS code based on jQuery, but it doesn’t work. This is the code:
<script type="text/javascript" src="jquery-1.6.4.js" />
<script type="text/javascript">
$(document).ready(function() {
alert('Hello');
});
</script>
It is under a tag without “runat=server” attribute and I don’t know the origin of the problem because the JS consoles of the webbrowser doesn’t register any error.
How can I fix that?
The
<script>tag should not be self-closing. So:should be:
Also make sure that
jquery-1.6.4.jsexists on the specified url.