Skip to main content

Bug Tracker

Side navigation

#4951 closed bug (invalid)

Opened July 23, 2009 03:21AM UTC

Closed June 13, 2010 01:42PM UTC

Last modified March 13, 2012 05:41PM UTC

$("<div id='a'>").appendTo("#bar") doesn't work in chrome 2.0

Reported by: Xavi Owned by:
Priority: minor Milestone: 1.3.2
Component: core Version: 1.3.2
Keywords: chrome, xhtml Cc:
Blocked by: Blocking:

$("<div id='foo'>").text("test").appendTo("#bar") does not work on "application/xhtml+xml" pages in chrome

However $("<div id='foo'/>").text("test").appendTo("#bar") work just fine.

Attachments (0)
Change History (2)

Changed July 23, 2009 11:48AM UTC by jerone comment:1

The second one is the correct one. You should alwasy add the closing slash (/).

Changed June 13, 2010 01:42PM UTC by dmethvin comment:2

component: unfiledcore
resolution: → invalid
status: newclosed

As jerone said, the html inside the $() is invalid markup, it either needs a closing slash or a closing tag. The documentation is clear on this.