title: Remove portion of text using GetElementsByClassName
body: <p>I'm trying to use the following script to remove ".00" from all prices on a page I'm working on. The ".00" is built in automatically by the WP theme I'm working with.</p>
  
  <p>Here's the script I'm using:</p>
  
  <pre><code>&lt;script&gt;
  window.onload = function() {
      var str = document.getElementsByClassName("hungry-menu-item-price").innerHTML; 
      var res = str.replace(".00", "");
      document.getElementsByClassName("hungry-menu-item-price").innerHTML = res;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The prices are formatted as such:</p>
  
  <pre><code>&lt;h4 class="hungry-menu-item-price"&gt;$24.00&lt;/p&gt;
  </code></pre>
  
  <p>...but it's not working. What am I missing?</p>