title: get elements by class name and store element in variable
body: <p>I'm trying to do the following:</p>
  
  <pre><code>function() {
   var elements = document.getElementsByClassName('class');
   var length = elements.length;
   for (var i = 0; i &lt; length; i++) {
    var element = elements[i];
    element.addEventListener('input', function() { return handleInputEvent(element); }, false);
   }
  }
  function handleInputEvent(element) {
   var value = element.value; // empty string
  }
  </code></pre>
  
  <p>but when I try to get the element's value, it keeps coming back as an empty string even though I'm typing in a number or letter. Any ideas?</p>
  
  <p>html is a bunch of inputs</p>
  
  <pre><code>&lt;input type='text' class='class'/&gt;
  &lt;input type='text' class='class'/&gt;
  &lt;input type='text' class='class'/&gt;
  </code></pre>