Skip to content

Instantly share code, notes, and snippets.

@gwa
Created January 7, 2014 08:07
Show Gist options
  • Save gwa/8296080 to your computer and use it in GitHub Desktop.
Save gwa/8296080 to your computer and use it in GitHub Desktop.
Check if a jQuery plugin (e.g. colorbox) is loaded.
function _initColorbox()
{
// return if colorbox not loaded
if (!jQuery().colorbox) {
return;
}
$(".selector").colorbox({});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment