title: How to get the name of an element with Javascript?
body: <p>I'm trying to get the name of an element in Javascript. Meaning if the element is <code>&lt;div /&gt;</code>, then <code>"div"</code> would be returned. If it's <code>&lt;img src="" /&gt;</code> then <code>"img"</code> would be returned. I'm using jquery to select a bunch of elements and then calling a custom function on all of them. Within that function I want to know what I'm dealing with. How do I do this?</p>
  
  <p>Seems like a simple thing. And I think I've done it before but I just can't find it. Google results keep giving me "get element by name" no matter how I phrase it.</p>