Possible Duplicate:
How to check if jQuery is loaded and what version?
What is the best way to check to see if JQuery is loaded?
Possible Duplicate:
How to check if jQuery is loaded and what version?
What is the best way to check to see if JQuery is loaded?
if (typeof jQuery === 'undefined') {
// jQuery is NOT available
} else {
// jQuery is available
}
look on http://jquery-howto.blogspot.com/2009/03/check-if-jqueryjs-is-loaded.html
Method 1:
if (jQuery) {
// jQuery is loaded
} else {
// jQuery is not loaded
}
Method 2:
if (typeof jQuery == 'undefined') {
// jQuery is not loaded
} else {
// jQuery is loaded
}
in try catch
try
{
var jqueryIsLoaded = jQuery;
jQueryIsLoaded = true;
}
catch(err)
{
var jQueryIsLoaded = false;
}
if(jQueryIsLoaded)
{
}
else
{
}