title: Uncaught TypeError: Object #<HTMLBodyElement> has no method 'css'
body: <p>I want to eventually loop through all of the nodes inside body (not implemented yet) and get the background and text color from every node. However, I am getting <code>Uncaught TypeError: Object #&lt;HTMLBodyElement&gt; has no method 'css'</code>.  It is occuring on <code>var bg = node.css("background-color");</code></p>
  
  <p>Here is my code</p>
  
  <pre><code>function grabColors() {
      var colorArray = new Array();
      var body = $("body");
  
      console.log(body);
  
      body.each(function(index, node){
          console.log(node);
          getColorsFromChild(node);
      });
      console.log(colorArray);
  }
  
  function getColorsFromChild(node) {
      var bg = node.css("background-color");
      var bg2 = node.css("background");
      var color = node.css("color");
  
      if ($.inArray(bg, colorArray) == -1) {
          colorArray.push(bg);
      }
      if ($.inArray(bg2, colorArray) == -1) {
          colorArray.push(bg2);
      }
      if ($.inArray(color, colorArray) == -1) {
          colorArray.push(color);
      }
  }
  grabColors();
  </code></pre>