Check if jQuery plugin is loaded
The previous post checked if jQuery is loaded, now it is time to check if particular jQuery plugin is loaded. Checking if plugin exists or if plugin has been already loaded is useful if you are writing your jQuery code that depends on that plugin. Here is how to check if some jQuery plugin is loaded or not: if(jQuery().pluginMethod) {
//jQuery plugin exists
} else {
//jQuery plugin DOES
//jQuery plugin exists
} else {
//jQuery plugin DOES
Comments
Post a Comment