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")); 

http://api.jquery.com/html/


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -