Author:
erics , September 8th, 2012
var Tag = jQuery(‘yourElementSelector’).get(0).tagName.toLowerCase(); Note: nodeName also works in place of tagName!
Categories: How-To's , Technology Tags: GET , get(0) , howto , JQuery , nodeName , tagName , tips , toLowerCase
| No comments
Author:
erics , May 17th, 2011
Important Note: This solution REQUIRES jQuery 1.6 or better due to the addition of the :focus selector! Here is how I used it for a form in a jQuery UI dialog:
var Info = jQuery ( this ) . find ( ':focus' ) . get ( 0 ) . tagName ;
if ( tagName == 'INPUT' ) return false ;
Categories: How-To's , Technology Tags: Element , Focus , Focused , howto , javascript , JQuery , selected , tagName , tips
| No comments