I have this code:
parent.find('input, select, textarea').each(function () {
console.log($(this));
});
I want to know if $(this)
is text / checkbox / radio / select / textarea
How can I achieve that?
Any help is appreciated
I have this code:
parent.find('input, select, textarea').each(function () {
console.log($(this));
});
I want to know if $(this)
is text / checkbox / radio / select / textarea
How can I achieve that?
Any help is appreciated
Have you tried is
?
parent.find('input, select, textarea').each(function () {
if($(this).is('input')){
console.log('Input it is');
}
...
});