Displaying 1 result from an estimated 1 matches for "descendantarray".
2005 Nov 24
1
Extended $ function called $$
...var dotPos = part.indexOf(''.''); // the dot position (-1 if not found)
if (dotPos == -1){
var nodeList = document.getElementsByTagName(part);
elements.append(nodeList);
// ".class" find any type of element of a given class.
} else if (dotPos == 0) {
var descendantArray = Element.getDescendants(element);
var className = part.substring(1,part.length);
for(var i=0; i<descendantArray.length; i++){
var descendant = descendantArray[i];
if(Element.Class.has_any(descendant,className)){
elements.push(descendant);
}
}
// "type.class&quo...