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'}
}));
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).