I have a js file and execute with :
<div id="result">
<script type="text/javascript" src="js/tracking.js"></script>
</div>
My main page has 2 divs (2 colums in page) and there are buttons on the left div. When i click to the first button, i would like to execute js file and display on the right. I can easily handle html files by :
$("#result").load( "test.html" );
But for js files i think i need to use getscript. I gave a shot with :
$("#result").load("#result",function(){$.getScript("js/tracking.js"); });
Ok, it executes the script but not loading into "result" div. It opens a new page and displays the result.
How should i modify?