MCPcopy Create free account
hub / github.com/davisking/dlib / BigToggle

Function BigToggle

docs/docs/dlib.js:55–93  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

53
54}
55function BigToggle(node)
56{
57 // Unfold the branch if it isn't visible
58 var next_node = node.nextSibling;
59 if (next_node.style.display == 'none')
60 {
61 // Change the image (if there is an image)
62 if (node.childNodes.length > 0)
63 {
64 if (node.childNodes.length > 0)
65 {
66 if (node.childNodes.item(0).nodeName == "IMG")
67 {
68 node.childNodes.item(0).src = "bigminus.gif";
69 }
70 }
71 }
72
73 next_node.style.display = 'block';
74 }
75 // Collapse the branch if it IS visible
76 else
77 {
78 // Change the image (if there is an image)
79 if (node.childNodes.length > 0)
80 {
81 if (node.childNodes.length > 0)
82 {
83 if (node.childNodes.item(0).nodeName == "IMG")
84 {
85 node.childNodes.item(0).src = "bigplus.gif";
86 }
87 }
88 }
89
90 next_node.style.display = 'none';
91 }
92
93}
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected