I'm trying to read in a list of hrefs before the page loads or on the page load and convert all of the hrefs into iframes that point to the location that the href used to point to. For example:
Take this:
<div id="maincontent" >
<p> </p>
<a href="http://page1.html">page1.html</a><br />
<br />
<a href="http://page2.html">page1.html</a><br />
<br />
<a href="http://page3.html">page1.html</a><br />
<br />
</div>
And replace with:
<div id="maincontent" >
<iframe src="http://page1.html"></iframe>
<iframe src="http://page2.html"></iframe>
<iframe src="http://page3.html"></iframe>
</div>
I'd also like to be able to delete the br and p tags while I am at it. Can someone show me how to read in the content into jQuery and then rewrite it to the page in my new format? Many thanks for your expertise!