The Original Jelani Harris The one and only

11Jun/120

How to check if a jquery plugin is installed or available

Most Jquery plugins act a lot like functions. They are attached to the main Jquery object, so essentially all we have to do is check that the function exists and is defined.

if ($.pluginFunction) {
  // Function exists, do your plugin stuff here.
} else {
  // Plugin does not exist, use alternatives or do nothing in here.
}
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.