I\'m trying to get the name of an element in Javascript. Meaning if the element is , then \"div\" would be returned. If it\'s &l
\"div\"
&l
$(selector).each(function() { switch (this.tagName) { // Handle cases } });