JSFiddle - React, Tailwind, and code Playground
Get HTML from another page and show it on a <div http://stackoverflow.com/q/6235043/154877
by dledle2
HTML
<div id="wrap">
<header>
<h1>Get HTML from another page and show it on a <div> </h1>
</header>
<section>
<div id="pull"></div>
<h2>Curabitur blandit, enim quis hendrerit</h2>
<p>The image to the left is pulled from <a href="http://jsfiddle.net/Marcel/n7eK5/show/">this page</a> using the jQuery method <a href="http://api.jquery.com/load">.load()</a>.</p>
</section>
<footer>This is a code example for the Stack Overflow question <br><a href="http://stackoverflow.com/q/6235043/154877">"Get HTML from a <div> and show it on another page"</a></footer>
</div>
CSS
body { color:#222; background:#fafafa; font:13px/1.4 'segoe ui', sans-serif; }
h1, h2 { margin:0 0 .5em; font:700 2.4em/1 'myriad pro', sans-serif; } h2 { color:#999; margin: 1em 0 .25em; font-size:1.6em; }
a { color:#06c; transition:.2s linear; -webkit-transition:.2s linear; } a:hover { color:#39f; }
p { margin:1em 0; } footer { color:#999; clear:both; margin:3em 0 0; text-align:center; } footer a { color:#777; }
#wrap { width:500px; margin:1em auto; padding:1.5em; background:#fff; box-shadow:0 1em 2em rgba(0,0,0,.2); }
#pull { float:left; padding:4px; line-height:0; margin:0 1em 1em 0; box-shadow:0 2px 6px #ccc; }
JavaScript
/* $("#pull").load("/Marcel/n7eK5/show/ #thumbs img:first"); */
/* $("#pull").load("/dledle2/koyh0jon/show/"); */
/* $("#pull").load("/dledle2/koyh0jon/show/ div#myPageContentDIV.myPageContentClass:first"); */
$("#pull").load("/dledle2/koyh0jon/show/ #myPageContentDIV:first");