All pastes #508679 Raw Edit

MellerTime

public javascript v1 · immutable
·published 2007-05-25 03:26 UTC
rendered paste body
function page_tree_init ( ) {		var tree = $('page_tree');		var elems = document.getElementsByClassName('child', tree);		elems.each(hook_page_tree);	}function hook_page_tree ( obj ) {		var parent = obj.parentNode;		// when you click this LI element, toggle the display of its children	parent.onclick = function ( ) { obj.toggle(); }	}// add our load event, which will find all our parent items and add // javascript events ot them for on-click that will expand their childrenwindow.onload = function ( ) { page_tree_init(); }