I have a div with the id of \"secondHeader\" and I want to replace that entire div with another div with the same id of \"secondHeader\" but instead of replacing it , it jus
Using $.get() worked for me but I had to extract the container from the response document first:
$.get("/page.html", function (data) { var elem = $(data).find('#container'); $("#puthere").replaceWith(elem); });