Last active
December 19, 2015 20:18
-
-
Save andershaig/6012165 to your computer and use it in GitHub Desktop.
Remap jQuery to $
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 ($, SampleNamespace, undefined) { | |
| SampleNamespace.publicMethod = function () { | |
| // Do something public | |
| }; | |
| var privateMethod = function () { | |
| // Do something private | |
| }; | |
| $(document).ready( function () { | |
| // Do whatever you want and use jQuery as you usually would here, | |
| // e.g. | |
| SampleNamespace.publicMethod(); | |
| }); | |
| }(jQuery, window.SampleNamespace = window.SampleNamespace || {})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment