I have a script which I need to change at runtime and reload changes
So the script is:
<body>
<script id="scriptId" src="myJsFile_1.js"></script>
//Rest of the page here
<script>
$(document).ready(function() {
$("#buttonId").click(function() {
//Change the script src to myJsFile_2.js and reload
})
});
</script>
</body>
</html>
How can I do this?