jerkovicl
9/2/2014 - 12:48 PM

querySelector example

querySelector example

  • Syntax
element = document.querySelector(selectors);
  • Example
var select = document.querySelector;
var el = select("#id");
var el2 = select(".myclass");
var body = select("body"); //var body = document.body;
body.removeChild(el);