I have an array with different elements inside it. Like array contain input elements and select elements. I want to check for particular type. I tried this but it didn\'t work>
Just use .is() to match the tag name:
.is()
if (element.is('input'))
But ideally rework the code and don't check for tag names in your loop.