Okay, I'm still having some problems getting that to work as what you've suggested is pretty much what I was attempting. However I'm glad to know that that the problem lies elsewhere and is more specific to my JS code. I'll look into this, and get back if I still can't get anywhere. I do have one question though..
I've successfully managed to replace the JS code for the DOM element explicitly for debugging purposes by using the following code:
Code:
$('script#main').html( '$(function (){ alert(\'hi\');});' );
However once the DOM element is swapped, no alert is prompted. I've also tried..
Code:
$('script#main').html( 'alert(\'hi\')' );
.. to no avail.
What would I need to do to ensure the alert is shown as soon as the content of <script id='main' type='text/javascript'> is changed? Once again I'll ask, is this possible even?
Bookmarks