Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
146
rated 0 times [  149] [ 3]  / answers: 1 / hits: 48688  / 12 Years ago, mon, march 26, 2012, 12:00:00

http://www.frostjedi.com/terra/scripts/demo/jquery02.html



According to this link elements can be moved around by doing $('#container1').append($('#container2')). Unfortunately, it doesn't seem to be working for me. Any ideas?


More From » jquery

 Answers
1

See jsfiddle http://jsfiddle.net/Tu7Nc/1/



You must append not your div exactly, but your div's content(inner HTML) with Jquery's html() function.



HTML:



<div id=1>aaa</div>
<div id=2>bbb</div>​


Jquery:



$(#1).append($(#2).html());


Result:



aaabbb
bbb

[#86606] Saturday, March 24, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kalistaz

Total Points: 0
Total Questions: 100
Total Answers: 106

Location: Bermuda
Member since Thu, Apr 20, 2023
1 Year ago
;