Moving on a little now I have it working, I am looking at the edit in place
plugin by David Hauenstein (http://www.davehauenstein.com/code/?a=inplace)
when he replaces the item he does the following:
var original_element = $(this);
var original_html = $(this).html();
original_element.css("background", settings.bg_out);
$(this).parent().remove();
original_element.html(original_html);
I tried it by simply copying the old html and trying to insert that back in,
but every so often this failed:
var oldhtml = $(this).html();
$(this).parent().html(oldhtml);
I don't understand why we have to use the original element and not the just
pop the html back into the dom?
I hope these snippets make sense.
Simon
--
View this message in context:
http://www.nabble.com/Add-to-Dom-tf2773025.html#a7746956
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/