Home JQuery How to check if JQuery library is loaded?
 
 
 

How to check if JQuery library is loaded?

PDF Print E-mail

Question: How to check if JQuery library is loaded?

 

Answer:

Use the following code withing your JavaScript tags

 
if(jQuery){  
    alert('jQuery loaded');  
}else{
    alert('jQuery not loaded');
} 
 

This method can be used to check if any other JavaScript variable or function exists or is set and thus is not limited to jQuery alone. 

 

+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!