jquery nodename returning undefined
Use the prop() of jQuery: alert($(‘#last’).prop(“nodeName”));
Use the prop() of jQuery: alert($(‘#last’).prop(“nodeName”));
The tagName property is meant specifically for element nodes (type 1 nodes) to get the type of element. There are several other types of nodes as well (comment, attribute, text, etc.). To get the name of any of the various node types, you can use the nodeName property. When using nodeName against an element node, … Read more