Ideally, in jQuery's style: $ele.prop('tagName')
You can do $ele.name
That's what I am doing right now. But, I am working on a project where the code is executed both on the server side and in the browser, and doing $ele.name does not work in the browser. An alternative approach would be the availability of a .get() method, so I can do $ele.get(0).name on both the client and server side.
Right now I am using feature detection to deal with both environments.
Thanks - yes, that indeed works. This issue is more about maintaining consistency with jQuery's API.
You could try doing something like...
var tagName = elem.tagName || elem.name;
Should work in browser & server.