codingtcher.com
Theme Night
Home
Login

Check if jquery is installed

//check if jquery is installed
if (typeof jQuery == "undefined") {
  alert("JQuery is not installed");
} else {
  alert("JQuery is installed correctly!");
}

//check if jquery is loaded
$(document).ready(function(){
  if (jQuery) {  
    // jQuery is loaded  
    alert("Yeah!");
  } else {
    // jQuery is not loaded
    alert("Doesn't Work");
  }
});

//test if jquery works
window.onload = function() {
    if (window.jQuery) {  
        // jQuery is loaded  
        console.log("jQuery has loaded!");
    } else {
        // jQuery is not loaded
        console.log("jQuery has not loaded!");
    }
}

//how to check if jquery is loaded
window.onload = function() {
    if (window.jQuery) {  
        // jQuery is loaded  
        alert("Yeah!");
    } else {
        // jQuery is not loaded
        alert("Doesn't Work");
    }
}

Related Code