Skip to content

Instantly share code, notes, and snippets.

@arsho
Last active April 10, 2020 17:40
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 arsho/d6fe9c3e1759f2a080aba614da25c335 to your computer and use it in GitHub Desktop.
Save arsho/d6fe9c3e1759f2a080aba614da25c335 to your computer and use it in GitHub Desktop.
var count = 0;
$(".child-domains").each(function(index)
{
$this = $(this);
children_length = $this.find('a').length;
count += children_length;
}
);
console.log("Total = ", count);
$count_section = 1;
$count_subsection = 1;
$self_service = "";
$third_party = "";
$(".table tr").each(function(item, data){
$tr = $(this);
if($tr.attr("class") == "active"){
$section_title = $tr.children("td:first").text();
console.log($count_section+".#### "+$section_title+":")
$count_section++;
$count_subsection = 1;
}
else{
$subsection_title = $tr.children("td:first").text();
console.log(" "+$count_subsection+". <b>"+$section_title+"</b>: "+$value);
$count_subsection++;
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment