Reputation: 897
I'm writing web-part for Sharepoint 2010 and I need use JQuery.
$(function(){
canvas = document.getElementById("canvas");
ctx = canvas.getContext("2d");
clockImage = new Image();
setInterval(drawScene, 1000);
});
But when I try to debug my web-part, there is error:
Runtime error Microsoft JScript: The value of the "$" or is NULL, or if it is not defined or not an object Function
I've added JQuery to Style Library and my ascx page:
<script type="text/javascript" src="~/StyleLibrary/scripts/jquery.js"></script>
What should I do to fix it?
Upvotes: 0
Views: 401
Reputation: 2654
Look for the another reference avalialble for the Jquery in your page or the master page ?
If yes then remove one of the references..
If there are more then one reference calls available for the jquery script it will break the functionality of jquery script.
Also check for any other call tho jquery script before the reference is called ?
Thanks
Upvotes: 1