User:Locke/common.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
no edit summary
mNo edit summary
mNo edit summary
Line 81: Line 81:
  var nodeList = [];
  var nodeList = [];
  for (var child = parent.firstChild; child != null; child = child.nextSibling) {
  for (var child = parent.firstChild; child != null; child = child.nextSibling) {
  alert(name + child.nodeName);
   if (child.nodeType == 1 && name == child.nodeName) { nodeList.push(child); }
   if (child.nodeType == 1 && name == child.nodeName) { nodeList.push(child); }
  }
  }