#990 closed bug (invalid)
Chaining doesn't always work as expected.
Reported by: | dialtone | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.1.2 |
Component: | core | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$("<div>ciao</div>").after($("<span>bello</span>")).appendTo("body");
Only appends the div without any trace of span.
$("<div>div</div>").attr("id","test").appendTo("body"); $("#test").after($("<span>span</span>"));
This works but it's not really a good solution because it requires me to add a new id attribute.
Change History (2)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
aercolino is correct - you can't insert an element before an element that isn't actually in the document yet. His solution will suit you just fine.
Note: See
TracTickets for help on using
tickets.
This works as expected: