I need to capture all of the text of the body and replace it after I have ran it against a reg expression.
I have tried the following ways already (these are without the expression applied, just trying for basic html replacement here)....
var html = $('body').html();
### the problem with this method is it doens't return the <body> tags when it replaces it since the jQuery replaceWith function actually deletes the code it finds, I've also tried manually inserting the tags into the parameters of the function but it doenst work.
The way to fix it would seem something like this,
but that will fail because replaceWith is not a function of html.
var html = $('body').parents().html();
### the problem with this method is it includes everything in the head also, so obviously it fails when it tried to include the head twice.
### this doesnt work either, here I'm trying to find the html by going from the child node...
My body code is here...