Skip to main content

Bug Tracker

Side navigation

#3352 closed bug (fixed)

Opened September 10, 2008 01:20PM UTC

Closed March 02, 2009 12:33AM UTC

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:
Description

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)
Change History (2)

Changed September 10, 2008 02:43PM UTC by flesler comment:1

owner: → flesler
status: newassigned

Changed March 02, 2009 12:33AM UTC by dmethvin comment:2

resolution: → fixed
status: assignedclosed

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