jquery-plugin datepicker does not work when cloned
<p>I have a following codes (markup and javascript) in which each block of 2 text boxes are cloned. Each block contains 2 text box; one with normal text box; the other is text box (id of "textboxDueDate") with datepicker plug in associating with. Only the first/original works with popup calendar when user clicks inside it. However, cloned "textboxDueDate" text boxes does not have popup calendar showed when they are clicked inside. What are wrong with my codes?</p>

<pre><code>    &lt;div&gt;
        &lt;input type="button" id="buttonAddBookTrack" value="Add Another Book Track" /&gt;
&lt;/div&gt;

        &lt;div id="divTemplate"&gt;
        &lt;fieldset&gt;
            &lt;legend&gt;Book&lt;/legend&gt;
            &lt;div&gt;
                &lt;label&gt;Book ISBN: &lt;/label&gt;
                &lt;input type="text" /&gt;
            &lt;/div&gt;
             &lt;div&gt;
                &lt;label&gt;Due Date: &lt;/label&gt;
                &lt;input type="text" id="textboxDueDate" /&gt;
            &lt;/div&gt;
        &lt;/fieldset&gt;
&lt;/div&gt;

        &lt;div id="divOtherBooks"&gt;&lt;/div&gt;


&lt;!-- java script ----&gt;
&lt;script type="text/javascript"&gt;
    var _idCount = 1;

    $(document).ready(function () {
        $('input[id^=textboxDueDate]').datepicker(); 

        $('#buttonAddBookTrack').click(function () {
            var appendedDiv = $('&lt;div&gt;').appendTo('#divOtherBooks').data('divClonedTemplate', '_' + _idCount);
            $('#divTemplate').children().clone().appendTo(appendedDiv);

            $('input[id^=textboxDueDate]').not('.hasDatePicker').datepicker();  

            _idCount++;
        });
    });
&lt;/script&gt;
</code></pre>
