How to find element type in JQuery
<p>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</p>

<pre><code>var mandotaryElementsArray = $('.mandotary');

$.each(mandotaryElementsArray, function(index, element){

    if (element == input) {

        var $inputElement = $(this);
        var test1;

    } else if (element == select) {

        var $selectElement = $(this);
        var test2;

    }

}); //end of .each()
</code></pre>

<p>Actually i want to check something that is similar to <strong>instance of</strong> in Java. Here i want to check if element is type of <strong>input</strong> then do this, if element is type of <strong>select</strong> then do this, if element is type of <strong>radiobutton</strong> then do this.. How can i make this check here?
Thanks </p>
