Hmm. Well, when adding new elements to the DOM you can do like this:
Code:
var image = $('<div id="image"><img src="example.gif"></div>');
image.some_jquery_function();
$('#dest').append(image);
So possibly, you could just replace the first line with
Code:
var image = $(msg);
And when inserting the element you can choose what ever function you want of course, like append(), prepend(), insert(), insertBefore() etc. depending on where you want it. See the jQuery documentation.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
|