jquery selectors (finding tag)

Posted by matthewsteiner on Stack Overflow See other posts from Stack Overflow or by matthewsteiner
Published on 2010-05-05T01:42:07Z Indexed on 2010/05/05 1:48 UTC
Read the original article Hit count: 182

Filed under:

I'm sure this is simple, but I can't seem to figure it out. I need to be able to pass a function an element id, and know what element tag it is.

For example:

<a id="first"></a>
<input id="last" />

If I know the id is "first", how can I get that the tag is "a"?

© Stack Overflow or respective owner

Related posts about jQuery