Created
April 30, 2013 16:51
-
-
Save mlynch/5490044 to your computer and use it in GitHub Desktop.
FeedTheFire Codiqa Demo
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
var ref = new Firebase("https://YOUR_FIREBASE_NAME.firebaseio.com/"); | |
ref.child("meta").once("value", function(snapshot) { | |
$("#feed > :first").html(snapshot.val().description); | |
}); | |
ref.child("articles").limit(10).on("child_added", function(snapshot) { | |
var article = snapshot.val(); | |
var link = $("<a>", {"href": article.link, "target": "_blank"}); | |
$("#feed").append($("<li>").append(link.html(article.title))); | |
$('#feed').listview('refresh'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment