text
document.ready
happens only once, when document is loaded. AJAX request does not cause it.
text
This should work.
Also try to change $(msg).find("#content").html()
to $(msg).find("#content")[0].innerHTML
, as jquery html strips out tags.
EDIT
Take a look at this thread there is a long discussion about why that happens. In case like this $(msg)
jquery will always remove script tags. But at the same time $(msg).filter("script")
returns scripts, so you can find those scripts first and then insert them all after $('#content').html( $(msg).find("#content").html() );