Skip to main content

Bug Tracker

Side navigation

#6351 closed bug (invalid)

Opened March 25, 2010 10:11AM UTC

Closed July 28, 2010 03:14AM UTC

$elm.append() not consistent with $().appendTo()

Reported by: noelboss Owned by:
Priority: Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: append appendTo jQuery Core manipulation Cc:
Blocked by: Blocking:
Description

This does work:

$('<span/>', {

id: 'display' + key,

css: {fontStyle: 'italic'},

text: c+value

}).appendTo($selectedResult);

But this does not work, the "text" method does not work:

$selectedResult.append($('<span/>', {

id: 'display' + key,

css: {fontStyle: 'italic'},

text: c+value

}));

But this works:

$selectedResult.append($('<span>'+c+value+'<span/>', {

id: 'display' + key,

css: {fontStyle: 'italic'}

}));

Attachments (0)
Change History (2)

Changed March 25, 2010 12:49PM UTC by james_padolsey comment:1

Works for me: http://jsbin.com/iwoca3/

There are a bunch of vars you've got there (c,value,$selectedResult) and we don't know what they reference, - it would be great if you could create a test page for this bug (maybe on jsbin).

Changed July 28, 2010 03:14AM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

Please reopen with a complete test case.