I have a menu with say 5 buttons. On each item click, I want to AJAX load a HTML file that contains some script. The loaded file looks like the following:
<div>
someContent...
</div>
<script>
FileScriptObject = {
init: function() {
},
cleanup: function() {
},
};
</script>
I want to be able to $("#someDiv").load("externalFile.html"); and somehow, get hold of that FileScriptObject. Is it possible?