SyntaxFix
Write A Post
Hire A Developer
Questions
If you just want to check the type, you can use jQuery's .is() function,
Like in my case I used below,
if($("#id").is("select")) { alert('Select'); else if($("#id").is("input")) { alert("input"); }