Cloning a div and change its html content and append to another div

Cloning a div and change its html content and append to another div

can any one suggest me how to clone an existing div and then change its innerhtml content and id and then append to another existing div.
I want to clone the below div and change its entire html content an then append to another div which is a collapsible-set


<div data-role="collapsible" id="sampleDiv">
      <h1>Sample Div</h1>
     <p>Welcome to India</p>
</div>