I have a DIV that I would like to manipulate without those manipulations appearing in the browser. More specifically I’d like to remove a picture from a DIV and then save just the HTML.
divObj.find($(".picture1")).remove();
I tried techniques for copying divObj but even the copy referenced what was in the browser, so the above picture disappeared from the screen, which I don’t want to happen.
So I first need to make a copy that does not really reference the DIV in the browser, but performs the action in memory only. Is this possible?
Use
.clone()instead of.remove()..find()is completely unnecessary here.