In jquery 1.4 and 1.3, loading just the framework definition causes an error, why?
Whenever I load ONLY the 1.3 or 1.4 library on an html page im developing on my desktop I get an error that says "setting a property that only has a getter"
I dont have any additonal code, this is coming straight from the jquery.min.js file
I also get a bazillion warnings in Firebug.
Can someone help me resolve this issue?
I can't determine why 开发者_Go百科this is happening
<script type="text/javascript" src="js/jq/jquery.js"></script>
just try a simple function call to see if the base is even loaded.
jQuery(document).ready(function(){
alert("howdy");
});
alternative, find out if it is loaded (better)
<script type="text/javascript">
if (typeof jQuery == 'undefined')
{
alert('not loaded');
}
</script>
Third alternative, since I cannot know for sure if you have the library at the path you SAY it is within: change to :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
EDIT: FOR THE SHORT NUTS OUT THERE: (no typeof needed :)
<script type="text/javascript">
if (!window.jQuery)
{
alert('not loaded');
}
</script>
精彩评论