Skip to content

Instantly share code, notes, and snippets.

@alandipert
Created May 8, 2009 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alandipert/108648 to your computer and use it in GitHub Desktop.
Save alandipert/108648 to your computer and use it in GitHub Desktop.
function tableize(data, selector) {
return $("<table/>").append(
A(data).find(selector).map(function() {
var ret = "<tr/>";
$.each(this, function(k,v) { ret += "<td>"+v+"</td>" });
return ret + "</tr>";
}).get().join("")
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment