Timeline for How to move an element into another element
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 12, 2022 at 4:50 | history | edited | Peter Mortensen | CC BY-SA 4.0 | Active reading. Used more standard formatting (we have italics and bold on this platform). |
| May 26, 2016 at 10:15 | review | Suggested edits | |||
| May 26, 2016 at 11:01 | |||||
| S Oct 22, 2015 at 9:29 | history | suggested | René Sackers | CC BY-SA 3.0 | Restructured the sentence of the note about using .detach() to be a little more clear. |
| Oct 22, 2015 at 9:11 | review | Suggested edits | |||
| S Oct 22, 2015 at 9:29 | |||||
| Jul 10, 2014 at 22:37 | review | Suggested edits | |||
| Jul 10, 2014 at 22:42 | |||||
| Feb 4, 2014 at 4:34 | comment | added | John - Not A Number | Sorry, but Andrew Hare's accepted answer is correct - the detach is unnecessary. Try it in Pixic's JSFiddle above - if you remove the detach calls it works exactly the same, i.e. it does a move, NOT a copy. Here's the fork with just that one change: jsfiddle.net/D46y5 As documented in the API: api.jquery.com/appendTo : "If an element selected this way is inserted into a single location elsewhere in the DOM, it will be moved into the target (not cloned) and a new set consisting of the inserted element is returned" | |
| Dec 17, 2013 at 19:02 | comment | added | paulscode | Best answer. Accepted answer creates a copy, doesn't move the element like the question asks for. | |
| S Nov 6, 2013 at 2:07 | review | Late answers | |||
| Nov 6, 2013 at 2:11 | |||||
| S Nov 6, 2013 at 2:07 | review | First posts | |||
| Nov 6, 2013 at 2:08 | |||||
| Nov 6, 2013 at 1:50 | history | answered | Alejandro Illecas | CC BY-SA 3.0 |