PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/Documentation/Help/scripts/CollapsibleSection.js

#
JavaScript | 17 lines | 13 code | 4 blank | 0 comment | 5 complexity | d10ec8323639dcde089da14fe9910897 MD5 | raw file
 1
 2	function toggleSection(sectionElement) {
 3		var children = sectionElement.childNodes;
 4		if (children.length != 2) return;
 5
 6		var image = children[0].getElementsByTagName('IMG')[0];
 7		var content = children[1];
 8
 9		if (content.style['display'] == 'none') {
10			content.style['display'] = 'block';
11			image.src = '../icons/collapse_all.gif';
12		} else {
13			content.style['display'] = 'none';
14			image.src= '../icons/expand_all.gif';
15		}
16
17	}