Skip to content

Instantly share code, notes, and snippets.

@davestacey
Last active August 29, 2015 14:06
Show Gist options
  • Save davestacey/e5775f7ac0d8340aa7ea to your computer and use it in GitHub Desktop.
Save davestacey/e5775f7ac0d8340aa7ea to your computer and use it in GitHub Desktop.
ds_map.js
(function($){
$.fn.mapBaseFunctions = function() {
var ns = ns || {}; // set nameSpace
/*******************************************
Set your namespaced functions as non global variables,
keep the global scope clear to reduce naming clashes and keep memory usage down
*******************************************/
// Init Functions
ns.mapInit = function() {
console.log("Map");
};
/*******************************************
Set your namespaced functions as non global variables,
keep the global scope clear to reduce naming clashes and keep memory usage down
*******************************************/
// Execute all our functions!!!!!
var mapInit = ns.mapInit();
};
$("document").ready(function($) {
console.log('doc ready');
$.fn.mapBaseFunctions();
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment