examples/input/js/inputs.js
function elementType(element) {
  var name = element.nodeName.toLowerCase();
  if (name !== "input") {
    if (name === "select" && element.multiple) {
      return "select-multiple";
    }
    return name;
  }
  var type = element.getAttribute('type');
  if (!type) {
    return "text";
  }
  return type.toLowerCase();
}
function elementType(element) {
  var name = element.nodeName.toLowerCase();
  if (name !== "input") {
    if (name === "select" && element.multiple) {
      return "select-multiple";
    }
    return name;
  }
  var type = element.getAttribute('type');
  if (!type) {
    return "text";
  }
  return type.toLowerCase();
}
function elementType ( element ) { var name = element . nodeName . toLowerCase ( ) ; if ( name !== "input" ) { if ( name === "select" && element . multiple ) { return "select-multiple" ; } return name ; } var type = element . getAttribute ( 'type' ) ; if ( ! type ) { return "text" ; } return type . toLowerCase ( ) ; }
Returns the type of a DOM element.

@param  Object element A DOM element.
@return String         The DOM element type.
Returns the type of a DOM element .