here are the html elements :
<input class="myClass problemOne" type=text value=something></input>
<input class="myClass problemTwo" type=text value=somethingelse></input>
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".
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();
});
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.
Thanks a lot for any input !
edit explained end goal