Skip to content

Instantly share code, notes, and snippets.

@huckfinnaafb
Created February 2, 2012 19:48
Show Gist options
  • Save huckfinnaafb/1725367 to your computer and use it in GitHub Desktop.
Save huckfinnaafb/1725367 to your computer and use it in GitHub Desktop.
function build_table(element, object) {
var i;
for (i in object) {
$(element).append("<tr><td>"+i+"</td><td>"+object[i]+"</td></tr>");
}
}
build_table("#sam", {
foo: "bar",
baz: "fizz"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment