title: Twitter Bootstrap Popover and AJAX
body: <p>I been browsing SO for solutions on how to load an ajax content on bootstrap popover but can't find any decent solutions.</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>$(".btnCharge").click(function () {
      $("#boxPayment").fadeIn();
  })
  .popover({
      title: 'Advantages',
      html: 'true',
      content: function () {
          $.ajax({
              type: "POST",
              url: "Index.aspx/FindAdvantagesByCCID",
              data: '{"id": "' + 1 + '"}',
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (data) {
                  var json = jQuery.parseJSON(data.d);
                  var html = '';
                  $.each(json, function (i, item) {
                      html = html + '&lt;a href="#"&gt;&lt;i class="icon-ok"&gt;&lt;/i&gt;' + item.Advantage + '&lt;/a&gt;&lt;br /&gt;';
                  });
              }
          });
      },
      placement: 'bottom',
      trigger: 'hover'
  });
  </code></pre>
  
  <p>How can i add the ajax response to popover content? I tried "return" and doesnt work.</p>
  
  <p>Any clean solutions?</p>