Occasionaly we will have a page that required some page specific Javascript functionality. I will create a javascript file called myPageName.js.
The question I have is how do people organise their top level functions. I currently have 15+ top level functions defined like this
function function1 (containerElement) {
...do function1;
}
function function2(slotActionButton) {
...do function2;
}
function function3(slotId) {
...do function3
}
This seems wrong and I am just polluting the global namespace. I am using jQuery. What are people's thoughts?
TIA
Pat Long