views:

80

answers:

0

Hi have a list generated with FBJS, now i need to 'attach' this element inside two div on the page, i tried:

div1=document.getElementById('div1');
div2=document.getElementById('div2');
empty(div1);
empty(div2);

// 1  
div1.appendChild(ul);
div2.appendChild(ul);

// 2   
div1.appendChild(ul);
ul2=ul;
div2.appendChild(ul2);
//3
div1.appendChild(ul);
div2.appendChild(div1.getFirstChild());

in all three code variant only the div2 is populated.