Core: Use `element.name` and `element.type` consistently

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.

Closes #1096