Skip to content

Instantly share code, notes, and snippets.

@simekadam
Created February 10, 2014 16:44
Show Gist options
  • Save simekadam/8919481 to your computer and use it in GitHub Desktop.
Save simekadam/8919481 to your computer and use it in GitHub Desktop.
test
var output = "";
var dump = function(){
$(".sitemapTree > .sitemapExpandableNode").each(function(index, element){
printNode(element);
});
console.log(output);
}
var printNode = function(element){
if($(element).is(".sitemapExpandableNode")){
printLeafNode($(element).children().children("a"));
$(element).children("ul").children().each(function(index, element){
printNode(element);
});
}else if($(element).is(".sitemapLeafNode")){
printLeafNode(element);
}
}
var printExpandableNode = function(element){
}
var printLeafNode = function(element){
output += $(element).find(".sitemapPageName").text();
output += '\n';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment