Bug Tracker

Opened 8 years ago

Closed 8 years ago

#9754 closed bug (invalid)

bug o.attr("nodeName") IE is BODY, Google\Chrome is undefined

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

<html> <body> <script src=jquery-1.6.2.js></script> <script> var o = $("body"); o = $(o); IE is BODY, Google\Chrome is undefined alert(o.attr("nodeName")); </script>

</body> </html>

Change History (2)

comment:1 Changed 8 years ago by anonymous

[@maxlength] 1.2.6 is ok 1.6.2 is error

comment:2 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

There is no *nodeName* attribute on the body tag unless one has been put into the markup like so:

<body nodeName="some_value">

If you want the nodeName *property* then use one of these:

$("body").prop("nodeName");
$("body")[0].nodeName;
Note: See TracTickets for help on using tickets.