jquery - javascript usage
I'm putting together an app that has few pages. I'm using an ajax call to popluate a div with 'sub pages'. Each of the sub pages has its own jquery / javascript stuff . As I navigate between and return to pages what (if anything) do I need to clean up behind me.
I tend to use this kind of syntax in each page to act as a kind of namespace for function calling etc
var edit = {
init:function()
{
$("#actSave").unbind("click").click(function()
{
if (edit.validation())
{
edit.save();
}
return;
})
$("#actCancel").unbind("click").click(function()
{
return;
})
}
edit.init();
What do I need to do about 'edit' ? Can it or should it be made null. Note that this page may get called many times in a single browser session
Any help appreciated