title: Construct div pattern using Ajax Json
body: <p>I'm going to use <a href="http://owlgraphic.com/owlcarousel/" rel="nofollow">owl carosel</a>.In the hardcoded div's working.Now i want to get this type via ajax function.I'll try to do this in several ways but not success.</p>
  
  <p>My Webmethod it returns the Image Path &amp; Caption values.</p>
  
  <pre><code>&lt;div id="owl-demo"&gt;
              &lt;div class="item"&gt;&lt;a class="item link"&gt;&lt;img src="/Content/images/sdfdfd.png" alt="Owl Image"&gt;&lt;/a&gt;&lt;p&gt;&lt;center&gt;CAPTION&lt;/center&gt;&lt;/p&gt;&lt;/div&gt;
              &lt;div class="item"&gt;&lt;a class="item link"&gt;&lt;img src="/Content/images/tyty.png" alt="Owl Image"&gt;&lt;/a&gt;&lt;p&gt;&lt;center&gt;CAPTION&lt;/center&gt;&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My Ajax function(instead of that hardcoded values )</p>
  
  <pre><code>   function GetAllImages()
  {
  
      $.ajax({
          type: "POST",
          url: "/Dest/GetAllImages",
          success: function (msg) {
              debugger;
              if (msg._allImg.length &gt; 0) {
                  $.each(msg._allImg, function (index, item) {
                     //In here i need to construct that above pattern
                      //My Webmethod it returns the Image Path &amp; Caption values.
  
  
                        var html = $("&lt;div&gt;").html();
                        var html2 = $("&lt;img src").html();
                        $('#owl-demo').append(html);
                  });
  
              }
              else {
  
              }
  
  
          }
      });
  }
  </code></pre>