Bug Tracker

Opened 14 years ago

Closed 14 years ago

#3352 closed bug (fixed)

IE fails creating HTML elements with no trailing slash

Reported by: rodnaph Owned by: flesler
Priority: minor Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:


I've noticed that when creating HTML elements with jQuery I usually use this syntax...

$( '<span>' );

This works in Firefox, but fails in IE. Example...

$( '<span>' )

.html( 'Some Text' ) .appendTo( $('body') );

I've noticed with when creating other types of elements as well as span's. You can also work around this by using $('<span/>')

Please find suggested fix attached.

Attachments (1)

IE-html-bug.patch (415 bytes) - added by rodnaph 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by rodnaph

Attachment: IE-html-bug.patch added

comment:1 Changed 14 years ago by flesler

Owner: set to flesler
Status: newassigned

comment:2 Changed 14 years ago by dmethvin

Resolution: fixed
Status: assignedclosed

This is fixed in 1.3.x thanks to the special-case handling of unadorned tags through document.createElement.

Note: See TracTickets for help on using tickets.