Structure for Javascript Development
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();
});
Comments
Post a Comment
Thanks
Warm regards,
Karthikeyan.T
tkarthikeyan@gmail.com
www.carthworks.com
Call us 09445 2772 06