I'm sure this has been answered here but I just don't know how to word the question. I am getting all of the elements of a form using:
//get all form elements
$("#" + thisForm + " :input").map(function () {
//get element data
var elementName = $(this).attr('name');
var elementType = $(this).attr('type');
and then storing them in a javascript object. The problem is that select and textarea elements do not have a type, so they appear as undefined. Is there a way to filter for them using the :input").map function or do I have to go to something like this:
$(thisForm + " > fieldset > select").add(thisForm + " > fieldset > textarea").each(function() {
// do stuff
});
Thanks