$.get - embedding script in html fragment - how to execute AFTER dom updated?

$.get - embedding script in html fragment - how to execute AFTER dom updated?

I am doing a $.get on a fragment of a page. The fragment contains some embedded script that will init the stuff on the page.
Trouble is, as I am sure you know, the script executes before the callback handler i the get call can insert the data into the dom so nothing works.

Only hit I found was this

http://forum.jquery.com/topic/jquery-problems-with-embedded-scripts

And I couldn't understand exactly what the solution was (ie how to code it). All I got were syntax errors or it just did not work, no matter what I tried.


The answer above seems to imply that I need to wrap the script fragment in a doc ready handler, is it really that simple and if so, can you show me how to actually code it (I really am not very good at this stuff) rather than the somewhat cryptic answer above.

It seems to me that the form plugin (using ajaxSubmit) manages this just fine, or at least it seems to so what's the difference between the form plugin and $.get?


Thanks

Dave E