title: How do I access the list of classnames using javascript/jQuery?
body: <p>here are the html elements : </p>
  
  <pre><code>&lt;input class="myClass problemOne" type=text value=something&gt;&lt;/input&gt;
  &lt;input class="myClass problemTwo" type=text value=somethingelse&gt;&lt;/input&gt;
  </code></pre>
  
  <p>and here is the javascript and jquery in which I am tryign to access classaname, neither method a, or b works ... "classname is null or not an object". </p>
  
  <pre><code>var myElems = $(this).find(".myClass");
  
  myElems.each(function(index) {
     var classLista = $(this).className.split(/\s+/);
     var classListb = myElems[index].className.split(/\s+/);
     var classListc = this.className.split(/\s+/);
  
     categories[index].key = classlist[1]; 
     categories[index].value = $(this).value();   
  });
  </code></pre>
  
  <p>The end goal is to have problemOne and problemTwo returned as string and then stored in an array, which then go to the database blah blah blah.</p>
  
  <p>Thanks a lot for any input !</p>
  
  <p><strong>edit</strong>
  explained end goal</p>