From The Blog

How can I check if a jQuery plugin is loaded?

7 September 2013, in JavascriptjQuery

Generally speaking, jQuery plugins are namespaces on the jQuery scope. You could run a simple check to see if the namespace exists:

if(jQuery().pluginName) {
     //run plugin dependent code
 }

,If we're talking about a proper jQuery plugin (on that extends the fn namespace), then the proper way to detect the plugin would be:

if($.fn.pluginname != 'undefined')

or
if($.fn.pluginname)


Post a Comment