To check if jQuery library is loaded, use the following JavaScript code :

if (typeof jQuery != 'undefined') {
 
    alert("jQuery library is loaded!");
 
}else{
 
    alert("jQuery library is not found!");
 
}

Alternative?

In some blogs and forum mention about the following alternative code :

if (jQuery) {  
 
   alert("jQuery library is loaded!");
 
} else {
 
   alert("jQuery library is not found!");
 
}

However, this is not working, when the jQuery library is not loaded, this code will failed (jQuery is not define), and the alert message will never execute.

At last, the first jQuery checking method is always recommended.

Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~
[ Read More ] You can find more similar articles at jQuery Tutorials