Hi i want to add a few hidden divs to an array and show them afterwards in different places one by one. I am a rookie so i will really appreciate your patience. http://jsfiddle.net/alexnode/qSZx6/1/
i have three divs like
<div id='a'><p>Aorum</p>Lorem ipsum dolor sit amet</div>
<div id='b'><p>Borum</p>Lorem ipsum dolor sit amet</div>
<div id='c'><p>Corum</p>Lorem ipsum dolor sit amet</div>
and i create an array
var myarray = new Array();
myarray[0] = $( '#a' ).html();
myarray[1] = $( '#b' ).html();
myarray[2] = $( '#c' ).html();
my problem is that when i call
$('<div/>', {
class: "someclass",
html: myarray[0],
} ).appendTo('body');
I get all the divs printed. I am sure it is something very basic but what ?
Edit : What i want is to get myarray[0] to include only the html of the div id=a not all the divs as you can see in the fiddle.
<div>to</div>