Skip to main content

Bug Tracker

Side navigation

#9754 closed bug (invalid)

Opened July 06, 2011 06:16AM UTC

Closed July 06, 2011 12:52PM UTC

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>

Attachments (0)
Change History (2)

Changed July 06, 2011 06:17AM UTC by anonymous comment:1

[@maxlength]

1.2.6 is ok

1.6.2 is error

Changed July 06, 2011 12:52PM UTC by dmethvin comment:2

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;