I'm back at coding som .NET stuff and I thought I'd play with Javascripts / jQuery.
I've added my /js/myscript.js file and it loads when the pages has loaded.
In my js file I only have one call alert('TEST').
Why isn't the alert triggered?
I'm on ASP.NET 4.0 - but I don' think that has anything to do with it.
Is there a way to detect if there is any conflict with other scripts?
This goes in the header:
<script type="text/javascript" src="js/myscript.js" ></script>
After page is loaded, I can use Firebug and exapnd the script and see it's content. So the script is loaded.
Embarrassing update
jQuery(document).ready(function() {
// Alert if jQuery is loaded
alert('Test1');
}
alert('Test 2');
As you can see in the above code, I'd forgotten to add the ); and the end of the jQuery(document).ready() function.
After a long day, even the simplest things can go unnoticed.
alert?);on thejQuery(document).ready()function.alert('TEST');does it work then?