0

I know html5 supported javascript can be used to select elements: document.getElementById(selector) I know jquery can be used to find a child element of another element with selectors.

But pure javascript has gotten better (for browsers that support HTML5) and I would like to do without jQuery. So it has document.getElementById to find elements.

Edit: So it's different because I want to avoid searching the entire page without jQuery.

Community
  • 1
  • 1
MrFox
  • 4,852
  • 7
  • 45
  • 81
  • Post some html structure. querySelectorAll or querySelector will do trick for u – Shoaib Chikate Nov 03 '14 at 07:24
  • @ShoaibChikate — Why? It's a general question with a clear description of the general markup structure being dealt with. – Quentin Nov 03 '14 at 07:25
  • This is not a duplicate question. The other question selects element anywhere on the page, I want to give the selector a startpoint. – MrFox Nov 03 '14 at 21:35

0 Answers0