Last active
November 26, 2019 21:14
-
-
Save zalun/606699 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fullred: #ff0000; | |
body { | |
font-family: Helvetica, Verdana | |
} | |
p { | |
padding: 7px 10px; | |
} | |
#demo { | |
border: 1px solid $fullred; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Request.HTML - jsFiddle/Gist integration demo | |
description: jsFiddle demo hosted on Gist using HTML Request to get Ajax data | |
authors: | |
- Piotr Zalewa | |
resources: | |
- /js/empty.js | |
- /css/normalize.css | |
normalize_css: no | |
lang_css: SCSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>This <span>content</span> is loaded from Gist via XHR request (<span>Ajax</span>)</p> | |
<p>It has also some <span>JavaScript</span> code which is setting the background for spans</p> | |
<script type='text/javascript'> | |
$$('#demo span').each(function(el) { | |
el.setStyle('backgroundColor', '#ffb'); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jsfiddle.net/gh/gist/mootools/1.2/606699/