Bug Tracker

Opened 14 years ago

Closed 13 years ago

Last modified 11 years ago

#4951 closed bug (invalid)

$("<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.

Change History (2)

comment:1 Changed 14 years ago by jerone

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

comment:2 Changed 13 years ago by dmethvin

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.

Note: See TracTickets for help on using tickets.