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

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