Bug Tracker

Opened 10 years ago

Closed 9 years ago

#6351 closed bug (invalid)

$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'}

}));

Change History (2)

comment:1 Changed 10 years ago by james_padolsey

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).

comment:2 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please reopen with a complete test case.

Note: See TracTickets for help on using tickets.