jQuery inner div tag binding dynamically
<pre><code>   $.ajax({
       type: "POST",
       url: "AdvService.asmx/GetDetails",
       data: "{}",
       contentType: "application/json; charset=utf-8",
       dataType: "json",
       success: function (response) {
           var cars = response;
           $('#cn_list').empty();
           var i = 1;
           $.each(cars, function (index, MyData) {
               if (i % 10 == 0) {
                   $('#cn_list').append('&lt;div class=cn_page&gt;&lt;/div&gt;');
               }
               $('#cn_list .cn_page:last').append('&lt;div class=cn_item selected&gt;&lt;center style=vertical-align:middle&gt;&lt;h2&gt;&lt;/h2&gt;' + MyData.Productname + '&lt;/center&gt;&lt;/div&gt;&lt;div class="cn_nav"&gt;' + '&lt;a id="cn_prev" class="cn_prev disabled"&gt;&lt;/a&gt;' + '&lt;a id="cn_next" class="cn_next"&gt;&lt;/a&gt;' + '&lt;/div&gt;');
               i++;
           });
       },
       failure: function (msg) {
           $('#cn_list').text(msg);
       }
   });
</code></pre>

<p>It will return <code>&lt;div&gt;</code> and close <code>&lt;/div&gt;</code>, but I need <code>&lt;div&gt;</code> and jQuery loop content then close the <code>&lt;div&gt;</code> tag, how to do this?</p>

<p>Sorry for confusion</p>

<p>see my before 
<a href="http://stackoverflow.com/questions/9376357/jquery-product-display-in-div-tag">Jquery product display in &lt;div&gt; tag</a></p>

<p>I get the result 100 result one by one so i manage that using below part</p>

<pre><code>            $('#cn_list').append('&lt;div class="cn_page"&gt;&lt;/div&gt;')
</code></pre>

<p>what i can see in firefox respons. 
<a href="http://i.stack.imgur.com/X4nuF.png" rel="nofollow">http://i.stack.imgur.com/X4nuF.png</a> <br><br></p>

<p>It should be </p>

<p><a href="http://i.stack.imgur.com/7ENNr.png" rel="nofollow">http://i.stack.imgur.com/7ENNr.png</a></p>
