Skip to content

Instantly share code, notes, and snippets.

@lafikl lafikl/scrollable.html
Last active Aug 29, 2015

What would you like to do?
<!DOCTYPE html>
<title>Hello world!</title>
<!-- some HTML things here -->
<div class="scrollable"></div>
<script type="text/javascript" src="Steady.js"></script>
var scrollable = document.getElementsByClassName('scrollable')[0]
var s = new Steady({
conditions: {
"min-width": 400,
"max-bottom": 200
scrollElement: document.getElementsByClassName('scrollable')[0],
handler: fn
function fn(values, done) {
var xhr = new XMLHttpRequest();'GET', 'imgs.html');
xhr.onreadystatechange = function() {
if ( xhr.readyState == 4 ) {
scrollable.innerHTML += xhr.response;
// telling Steady that we're done processing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.