Posts

Showing posts from November 5, 2017

Structure for Javascript Development

Image
It is not a core developer stuff to read, for designers !! Whenever i start client side javascript programming, used to struggle where to start from start i. So, my designer 'mind found' this snippet, useful to start. Happy coding! var ProjectName = function() { var fnNameA = function() { console.log("fnNameA called")}; var fnNameB = function() { console.log("fnNameB called")}; return { init: function() { // init table, chart fnNameA(); fnNameB(); } }; }(); function FnNameC (){console.log("fnNameC called")}; jQuery(document).ready(function() { ProjectName.init(); // function that need to initialise on start FnNameC(); });