I was wondering about on how to organise the code on my site, to make it clearer as possible and clearly readable. I'm organising it with namespace, separating every single section of the page. For example:var Header = {//code relative to the header}var CentralBody = {//code relative to the CentralBody}$(function(){//code to execute on doc ready}); First of all, I would know if it is a good way to organise code. In second instance, I was thinking about what must be placed where. I explain: If, for example, I have to assign some tooltip or to bind event with code like$('someclass').tooltip() $('someclass').on( 'event' , ... );where do I have to place this kind of functions? Do I have to place them in the concerning namespace?  Do I have to place them on document.ready?  Or writing functions in namespace and then call them on document.ready?
Organise site's module
javascript;jquery;object oriented