title: Setting data-content and displaying popover
body: <p>I'm trying to get data from a resource with jquery's ajax and then I try to use this data to populate a bootstrap popover, like this:</p>
  
  <pre><code>$('.myclass').popover({"trigger": "manual", "html":"true"});
  $('.myclass').click(get_data_for_popover_and_display);
  </code></pre>
  
  <p>and the function for retrieving data is:</p>
  
  <pre><code>get_data_for_popover_and_display = function() {
      var _data = $(this).attr('alt');
      $.ajax({
           type: 'GET',
           url: '/myresource',
           data: _data,
           dataType: 'html',
           success: function(data) {
               $(this).attr('data-content', data);
               $(this).popover('show');
           }
      });
  }
  </code></pre>
  
  <p>What is happening is that the popover is NOT showing when I click, but if I hover the element later it will display the popover, but without the content (the <code>data-content</code> attribute). If I put an <code>alert()</code> inside the <code>success</code> callback it will display returned data.</p>
  
  <p>Any idea why is happening this? Thanks!</p>