I know there are other posts like this, but I don't know if its appropriate to ask a question on someone else's question. Here's the link where I think I found the answer to my question of what to do: other question. I think the last solution on the page is probably the one to use.
My question that still remains is how to apply this to my scenario. My scripts are all contained within an outer function. It is based on this concept:
jQuery.noConflict();
jQuery(function($) {
var Engine = {
utils : {
functionName : function(){
// Do stuff in here
},
functionName2 : function(){
// do something else
}
},
ui : {
functionName : function(){
// Do stuff in here
},
functionName2 : function(){
// do something else
}
},
fixes : {
functionName : function(){
// Do stuff in here
},
functionName2 : function(){
// do something else
}
},
tweaks : {
functionName : function(){
// Do stuff in here
},
functionName2 : function(){
// do something else
}
}
};
Engine.utils.functionName();
Engine.utils.functionName2();
Engine.ui.functionName();
Engine.ui.functionName2();
Engine.fixes.functionName();
Engine.fixes.functionName2();
Engine.tweaks.functionName();
Engine.tweaks.functionName2();
});
I'm ultimately trying solve the problem of my scripts not working after an ajax call changes content. The linked question is "jquery : trigger $document.ready (so AJAX code I can't modify is executed)". The answers to that one, especially the last one, seem to be what I am looking for, but I'm not sure how to make that work with my scenario.