I am getting content of HTML tag by using outerHTML
var t=$("html")[0].outerHTML;
but I need to remove a specific div from result
<div id="admin_panel">...</div>
here is my jQuery code:
$(function() {
$('#save').click(function(){
var t=$("html")[0].outerHTML;
$.ajax({
type: "POST",
url: "save.php",
data: { code: t },
cache: false,
success: function(html){
alert('Changed saved');
}
});
})
});
How do I remove the div correctly?