Skip to main content

Bug Tracker

Side navigation

#11131 closed bug (invalid)

Opened January 06, 2012 06:09AM UTC

Closed January 06, 2012 01:29PM UTC

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';
Attachments (0)
Change History (2)

Changed January 06, 2012 08:19AM UTC by phoetry comment:1

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';

Changed January 06, 2012 01:29PM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

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

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