Request.HTML - jsFiddle/Gist integration demo
jsFiddle demo hosted on Gist using HTML Request to get Ajax data author(s): Piotr Zalewa
by BinaryAcid
HTML
<script src="/js/empty.js"></script>
<link rel="stylesheet" href="/css/normalize.css">
<p>Result will appear below with 1 sec delay</p>
<div id="demo"><p>This text will be replaced</p></div>
<p><a href='http://doc.jsfiddle.net/use/gist_read.html' target='_new'>Documentation</a></p>
<p><a href='http://gist.github.com/606699/' target='_new'>Gist Demo</a></p>
CSS
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
JavaScript
window.addEvent('domready', function() {
new Request.HTML({
url: '/gh/gist/response.html/606699/',
data: {'delay': 1},
method: 'post',
update: 'demo',
onSuccess: function(response) {
$('demo').highlight();
}
}).send();
})