use `element.name` and `element.type`

instead of using the jquery provided method, we use the native ones instead. we already rely on them in other places, therefore we don't get anything from using them here.