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
You want to wrap in div before inserting it.
$.ajax({ url: "/logged-in-content.html", success: function(response){ var loadedheader = $("").append( response.replace(/