Bug Tracker

Opened 8 years ago

Closed 8 years ago

#11131 closed bug (invalid)

In IE(6~8), $('<a class=aaa>') couldn't get the [0] method

Reported by: phoetry Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

In IE(6~8):

tyyeof $('<a class=aaa>').get(0) === 'undefined';
tyyeof $('<a class=aaa>')[0] === 'undefined';
typeof $('<a class=aaa/>')[0] === 'object';

But Other Browsers:

tyyeof $('<a class=aaa>')[0] === 'object';
typeof $('<a class=aaa/>')[0] === 'object';

Change History (2)

comment:1 Changed 8 years ago by phoetry

In IE(6~8):

typeof $('<a class=aaa>').get(0) === 'undefined';
typeof $('<a class=aaa>')[0] === 'undefined';
typeof $('<a class=aaa/>')[0] === 'object';

But Other Browsers:

typeof $('<a class=aaa>')[0] === 'object';
typeof $('<a class=aaa/>')[0] === 'object';

comment:2 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

The tag needs to be closed with </a>, as explicitly noted in the documentation.

http://api.jquery.com/jQuery/#jQuery2

Note: See TracTickets for help on using tickets.