MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / buildGlossary

Function buildGlossary

scripts/glossary.js:15–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13];
14
15function buildGlossary() {
16 var glossary = [];
17 $("dl").each(function(i, dl) {
18 var dts = $(dl).find("dt").toArray();
19 var dds = $(dl).find("dd").toArray();
20 glossary.push(
21 _.zip(dts,dds)
22 .map(function(d) {
23 return {
24 "title": $(d[0]).html(),
25 "description": $(d[1]).html()
26 };
27 })
28 );
29 });
30
31 $("#glossary").append($("dl").clone());
32
33 highlightTerms(glossaryLite);
34}
35
36function highlightTerms(dictionary) {
37 var html = d3.select("article").html();

Callers

nothing calls this directly

Calls 2

highlightTermsFunction · 0.85
$Function · 0.50

Tested by

no test coverage detected