Skip to content

Instantly share code, notes, and snippets.

@danschumann
danschumann / gist:9708266
Last active August 29, 2015 13:57
recursive menu
var
html, printRecord, entry, n;
// records is an array of objects with parent_id, name and id attributes
// [ {parent_id: ..., id: ..., name: ...}, ...]
html = '';
printRecord = function(parent_id){
html +='<ul>';