Created
December 26, 2013 23:27
-
-
Save SPodjasek/8140175 to your computer and use it in GitHub Desktop.
Proper way to develop jQuery plugins
This file contains hidden or 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 (factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(["jquery"], factory); | |
} else { | |
factory(jQuery); | |
} | |
}(function ($) { | |
/* | |
* ... | |
*/ | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment