Created
March 9, 2016 11:09
-
-
Save fvosberg/c3974562dc05cb44c5ec to your computer and use it in GitHub Desktop.
Wrapper for jquery functions
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
function executeWithJquery(callback) { | |
(function($){ | |
if(!$) { | |
if(typeof console === 'object') { | |
console.log('This plugin requires jQuery.'); | |
} | |
return; | |
} | |
callback(); | |
})((typeof jQuery !== "undefined" ? jQuery : null)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment