Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 17th, 2011  |  syntax: None  |  size: 0.18 KB  |  views: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var links = document.querySelectorAll("a");
  2. for (var i = 0; i < links.length; i++) {
  3.   parent = links[i].parentNode;
  4.   if (parent.nodeName == "div") {
  5.     alert("yes");
  6.   }
  7. }
clone this paste RAW Paste Data