JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
<select></select>
JavaScript
$.fn.getType = function(){ return this[0].tagName == "INPUT" ? this[0].type.toLowerCase() : this[0].tagName.toLowerCase(); }
alert($("input").getType());
alert($("SELECT").getType());