Questions tagged [tagname]

71 questions
158
votes
4 answers

Difference between .tagName and .nodeName

What is the difference between $('this')[0].nodeName and $('this')[0].tagName?
Kdniazi
  • 1,581
  • 2
  • 9
  • 3
31
votes
2 answers

jQuery find input type (but also for select)

I need to find the input type for radio buttons, text, and selects. Its easy to find the input type of anything with since $(this).attr("type") would return x My issue is that I need to support