function name_loop(){
var names_array = [];
$('.name_class').each(function(index){
names_array[index] = $.trim($(this).val());
});
return names_array;
}
the problem with the above code is that it returns only the first element and not the specified array. can someone solve it for me