Skip to content

Instantly share code, notes, and snippets.

@craigsimps
Created March 15, 2018 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigsimps/0a7a47e799d27542def206641a28d298 to your computer and use it in GitHub Desktop.
Save craigsimps/0a7a47e799d27542def206641a28d298 to your computer and use it in GitHub Desktop.
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