Skip to content

Instantly share code, notes, and snippets.

@ryanburnette
Created November 11, 2012 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburnette/4055795 to your computer and use it in GitHub Desktop.
Save ryanburnette/4055795 to your computer and use it in GitHub Desktop.
Do something if jQuery method is defined.
/*
This is one method that can be used to check if a method is valid. Then do something if that method proves valid.
*/
if ( $.isFunction($.fn.myFunction) === true ) {
/* Do stuff here */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment