jQuery's .load() method

When you want to load content from another page on the same server, and display it in your current page, you can use jQuery's "load" function. Only works on the same server, protocol and port, and isn't reliable in all browsers for local files from your hard drive. This is a "sometimes useful" function but very useful when it does work!

by ian_smithz

HTML

<iframe src="http://fiddle.jshell.net/webdevem/JfcJp/show/"></iframe>
<div id="result"></div>
The particular cell in that table has the following contents: "<span id="partialResult"></span>"

CSS

iframe, #result {
 margin: 10px;
 border: 1px solid #cacaca;
}

JavaScript

$('#result').load('http://fiddle.jshell.net/webdevem/JfcJp/show/');
$('#partialResult').load('http://fiddle.jshell.net/webdevem/JfcJp/show/ #specialContent');