/* aqTree2
Explorer-style trees from unordered lists
http://www.kryogenix.org/code/browser/aqtree2/
Usage:
Create a valid nested unordered list (UL) structure
Make the top-level UL of class aqtree2
Include this script
That's it!
*/
/* -----------------------------------------------------------------------------------
functions to build the tree on document load
----------------------------------------------------------------------------------- */
function getRandomID() {
myRandomID = '';
for (irandom=0;irandom<10;irandom++) {
p = Math.floor(Math.random()*26);
myRandomID += 'abcdefghijklmnopqrstuvwxyz'.substring(p,p+1);
}
return myRandomID;
}
function makeaqtree(ul,level) {
var cn=ul.childNodes;
var myReplacementNode = document.createElement("div");
// Walk through all LIs that are subordinate to this UL
for (var icn=0;icn 0) {
alert("UL structure is invalid; a UL contains a text node: '"+cn[icn].nodeValue+"'");
return;
}
} else {
alert("UL structure is invalid; a UL contains something other than an LI (a "+cn[icn].nodeName+", in fact)");
return;
}
}
// We know that the node we have now is an LI
// Walk through it and get all its content; add that content to a div
// If the content contains a UL, then:
// call makeaqtree with the UL; this will create its content as a div and return that div
// our content div must get an onClick handler that shows/hides the id'ed div
var contentNodes = cn[icn].childNodes;
var thereIsASubMenu = 0;
var subNodes = new Array();
for (var icontentNodes=0;icontentNodes 0) {
var icon = document.createElement("span");
icon.innerHTML = aqtree2_bulletHTML;
icon.className = 'aqtree2icon';
containerElement.appendChild(icon);
}
}
// Add all subnodes to the container element
for (isubNodes=0;isubNodes
- PTERIIDAE J.E. Gray, 1847
- Electroma STOLICZKA, 1871
- Pinctada RÖDING, 1798
- Pteria SCOPOLI, 1777
- †Arcavicula COX, 1964
- †Eopinctada TAMURA, 1961
- †Pteroperna MORRIS & LYCETT, 1853
- †Pterinella TOULA, 1882
- †Rhaetavicula COX, 1961
- †Somapteria TAMURA, 1960
- ISOGNOMONIDAE Woodring, 1925
- Isognomon LIGHTFOOT, 1786
- Crenatula LAMARCK, 1803
- †Gervilleioperna KRUMBECK, 1923
- †Linsdallia COX & ARKELL, 1948
- †Mulletia P. FISCHER, 1887
- †Pachyperna OPPENHEIM, 1900
- †Waagenoperna TOKUYAMA, 1959
- PULVINITIDAE Stephenson, 1941
- Pulvinites BLAINVILLE, 1824
- Hypotrema ORBIGNY, 1853
- Pulvinites BLAINVILLE, 1824
- MALLEIDAE Lamarck, 1818
- Malleus LAMARCK, 1799
- Malvufundus DE GREGORIO, 1885
- Vulsella RÖDING, 1798
- †Vulsellina RAINCOURT, 1876
- †Stefaniniella TAVANI, 1939
- †Bouleigmus BASSE, 1933
- Malleus LAMARCK, 1799
- †PTERINEIDAE Meek, 1864
- †Pterinea GOLDFUSS, 1826
- †Actinodesma SANDBERGER, 1850
- †Ectenodesma HALL, 1883
- †Actinodesma SANDBERGER, 1850
- †Actinodesma SANDBERGER, 1850
- †BAKEVELLIIDAE King, 1850
- Archihesperinus Rohdendorf, 1962
- †CASSIANELLIDAE Ichikawa, 1958
- Archipleciomima Rohdendorf, 1962
- †LITHIOTIDAE Cox, 1971
- Archipleciomima Rohdendorf, 1962
- †DATTIDAE Healey, 1908
- Archipleciomima Rohdendorf, 1962
- †POSIDONIIDAE Frech, 1909
- Archipleciomima Rohdendorf, 1962
2007-09-22