Created
August 25, 2014 20:05
-
-
Save billyboozer/e6cd0884abead2b628e4 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/piyatiqoyaku/3
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
$.getJSON( "https://sports-feed.firebaseio.com/sports/stories.json", function( data ) { | |
var items = []; | |
$.each( data, function( key, val) { | |
items.unshift( "<li id='" + key + "'><b>"+ val.user__screen_name +":</b><br>" + val.text + "</li><br>" ); | |
}); | |
console.log(items.length); | |
$( "<ul/>", { | |
"class": "my-new-list", | |
html: items.join( "" ) | |
}).appendTo( "body" ); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains hidden or 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
$.getJSON( "https://sports-feed.firebaseio.com/sports/stories.json", function( data ) { | |
var items = []; | |
$.each( data, function( key, val) { | |
items.unshift( "<li id='" + key + "'><b>"+ val.user__screen_name +":</b><br>" + val.text + "</li><br>" ); | |
}); | |
console.log(items.length); | |
$( "<ul/>", { | |
"class": "my-new-list", | |
html: items.join( "" ) | |
}).appendTo( "body" ); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment