how to clone inner div using jquery <= 1.4
<p>I have a situation where i am trying to use contents inside a div as template to create controls dynamically. So to explain with example: I have created a div element BaseControl as follows that will act as a template for my controls that i am going to create when user clicks on button. Then newly cloned (div) will be appended to "container" div. The problem i am encountering is that the clone does not copy div "emailEditButtonDiv" (inner div of BaseControl div). Is that expected behaviour or am i doing something wrong. How can this be resolved?</p>

<p>Thanks a lot
CSC</p>

<pre><code>&lt;div id="BaseControl"&gt;
  &lt;asp:Label ID="Label2" CssClass="controllabel" runat="server" Text="Email:" &lt;/asp:Label&gt;
  &lt;asp:TextBox ID="txtEmailAddress" runat="server"&gt;&lt;/asp:TextBox&gt;
  &lt;asp:LinkButton ID="anchor" runat="server"&gt;Anchor&lt;/asp:LinkButton&gt;&amp;nbsp;&amp;nbsp;
  &lt;div id="emailEditButtonDiv" class="EmailControlEditDiv" style="width: 25%"&gt;
    &lt;asp:LinkButton ID="EditButton" runat="server"&gt;Edit&lt;/asp:LinkButton&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class="container"&gt;
&lt;/div&gt;
&lt;span&gt;
  &lt;input type="button" id="imgBtnAddNewLineItem" value="Add New Email" /&gt;
&lt;/span&gt;

&lt;script src="Scripts/jquery-1.4.1.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
  $(document).ready(function () {
    $('#imgBtnAddNewLineItem').click(function (e) {
      $('#BaseControl').clone(true).appendTo('.container');
      return false;
    });
  })
&lt;/script&gt;
</code></pre>
