(1) This is probably a simple question but I've been unable to find a conclusive answer via the search gods. I'm using jQuery's load() function to replace the body of an element with some new HTML, pretty standard stuff. However, if the element in question already contains HTML will the existing elements that are being replaced be removed from the DOM? For example, say I have the following:
And then doing a $('#replace_me').load(....), will the P element above be removed from the DOM? What would be a good way for me to test that this is the case?
What happens to the name variable when the contents of 'replace_me' gets replaced?
Bear Bibeault wrote:(2) The script will be loaded but existing declarations will not be removed. Think of it as cumulative.
Some of this will be cleaned up later. ;) As you can see, I'm using a few plugins to get my work done. And each time the new HTML is returned, this stuff needs to happen.