title: Change cursor with getElementsByClass in JavaScript?
body: <p>I want my cursor to be a hand when hovering over elements with a class of "one" after clicking a button. Here is my code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" language="JavaScript"&gt;
      function cursor()
      {
      document.getElementByClass("one").style.cursor="pointer";
      }
  &lt;/script&gt;
  &lt;h1 class="one"&gt;Mouse over this text!&lt;/h1&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p class="fff"&gt;not me!&lt;/p&gt;
  &lt;button type="button" onclick="cursor()"&gt;Change cursor&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It has only worked so far when I change it to getElementById("one") and changed one of the elements from a "one" class to a "one" id. Why is this not working with class as well?</p>