Opened 12 years ago
Closed 12 years ago
#6986 closed bug (invalid)
append() and appendTo() not functionally equivalent
Reported by: | josho | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | manipulation | Version: | 1.4.2 |
Keywords: | append appendTo | Cc: | |
Blocked by: | Blocking: |
Description
this is a case where append() and appendTo() are not functionally equivalent.
this happens when appending a jQuery object from an array of jQuery objects, and potentially other collections. i'm not entirely sure if this is a bug or not; i can't make up my mind.
var stack = [
$('<div />')
, $('<div />') , $('<div />')
];
does not work $('#target').append($(stack));
works $(stack).appendTo('#target');
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Well for one thing, an array passed to $() should be an array of DOM elements. There is no jQuery() signature that takes an array of jQuery objects.
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
edit: goddamnit trac, formatted for her pleasure