For each input field on the page, that has an ID ending in "_name" and "_value", I've placed in two arrays. And for each of the values of the input (there are equal number of inputs for the nameArr and valArr) in the name array I would like to place before the input of the namrArr as a heading, then hide the input. However, I cannot seem to access to the value of the input once it's placed in an array??
var name = $("[id$=_name]");
var nameArr = $.makeArray(name);
var val = $("[id$=_value]");
var valArr = $.makeArray(val);
for(var i = 0; i < valArr.length; i++){
$(nameArr[i]).before("<h3>"+nameArr[i].val()+"</h3>");
$(nameArr[i]).hide();
}