Skip to content

Instantly share code, notes, and snippets.

@mlynch
Created April 30, 2013 16:51
Show Gist options
  • Save mlynch/5490044 to your computer and use it in GitHub Desktop.
Save mlynch/5490044 to your computer and use it in GitHub Desktop.
FeedTheFire Codiqa Demo
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