I am using MVC framework. jQuery is loaded in the layout page but when I try to run script on pages that are using the layout page, the script is not running and gives this error: Uncaught ReferenceError: $ is not defined I am running the following script to debug
$(document).ready(function () {
if (jQuery) {
// jQuery is loaded
alert("Yeah!");
alert($().jquery);
} else {
// jQuery is not loaded
alert("Doesn't Work");
}
});
If I put this script it will run and if I put it in a page that uses the layout page it will not run. I tried to load jQuery locally and from CDN and both method has the same problem.