Completing a Bulleted Menu Of Links (Page 1 of 5 )
Each ID is made up of two parts: the left part, which is either LI or UL; and the right part, which is a number. When any LI element that is expandable is clicked, the function “splitID(ID)” is called. This function splits the ID into two parts, throwing away the underscore. The function is:
IDPartsArr = ID.split("_");
//call the function to expand or collapse the unordered list
Lastly, this function calls another function, “expandOrCollapse().” The first argument of this function is the first element of the IDPartsArr array. The second argument of the function is the second element of the IDPartsArr array.