1$(document).ready(function(){
2 if (jQuery) {
3 // jQuery is loaded
4 alert("Yeah!");
5 } else {
6 // jQuery is not loaded
7 alert("Doesn't Work");
8 }
9});
1/* Answer to: "test if jquery works" */
2
3window.onload = function() {
4 if (window.jQuery) {
5 // jQuery is loaded
6 console.log("jQuery has loaded!");
7 } else {
8 // jQuery is not loaded
9 console.log("jQuery has not loaded!");
10 }
11}
1window.onload = function() {
2 if (window.jQuery) {
3 // jQuery is loaded
4 alert("Yeah!");
5 } else {
6 // jQuery is not loaded
7 alert("Doesn't Work");
8 }
9}