I am trying to select this element by attribute name and print the nodename, but the result is undefined.
The first alert works, but the second alert doesn't work.
HTML code:
<objeto bordeactivo type="image">
<img src="https://picsum.photos/536/354"/>
</objeto>
jQuery code:
var ob = $("[bordeactivo]");
var ob2 = ob.find("img");
// Works!
alert("ob>"+ob.attr("type"));
// NOT WORKING!
alert("nodeName>"+ob2.nodeName);
What is the problem?
My JsFiddle: