Created
July 21, 2017 13:15
-
-
Save surjithctly/3d5ab82e95613247cc80e4993e91c5c9 to your computer and use it in GitHub Desktop.
jQuery - Run only if Plugin Exists and the Element is found. Else Skip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cache class name | |
var $element = $('.element'); | |
if ($element.length && $.fn.functionname) { | |
// Do awesome Stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment