Replacing a HTML tag using JQuery -
ok after ajax request 'success' called , string 'data' passed, contains html of site requested. want extract in <body> tag of current site , replace in <body> tag that's stored in data string. how done?
i tried var b = $(data).find('body'); , .replacewith(b) b apparently object.
thanks help!
edit; ajax:
$.ajax({ type: "get", url: "managefiles.php", datatype: "html", success: function(data){ ... } });
all need replace html() of body tag
$("body").html($(data).find("body"));
Comments
Post a Comment