Created
March 15, 2018 16:09
-
-
Save craigsimps/0a7a47e799d27542def206641a28d298 to your computer and use it in GitHub Desktop.
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
var generico = (function ($) { | |
'use strict'; | |
/** | |
* Empty placeholder function. | |
* | |
* @since 1.0.0 | |
*/ | |
var functionName = function () { | |
// Empty function, do all the things. | |
}, | |
/** | |
* Fire events on document ready, and bind other events. | |
* | |
* @since 1.0.0 | |
*/ | |
ready = function () { | |
functionName(); | |
// Examples binding to events. | |
$(window).on('resize.generico', functionName); | |
$(window).on('scroll.generico resize.generico', functionName); | |
}; | |
// Only expose the ready function to the world | |
return { | |
ready: ready | |
}; | |
})(jQuery); | |
jQuery(generico.ready); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment