title: Create dynamic popover from function
body: <p>I'm working on translation social network, and in the posts I need to show some stats about votes for each suggestions (similar to answers in stackoverflow), so I need to create popover whenever the user hover on the label with dynamic content.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    function Popx(id)
  {
      $(id).popover({//here is my problem, I want dynamic id not static
          html: true,
          trigger: 'hover',
          content: function () {
              return $.ajax({url: 'ajax/ajaxpopoverstat.php?uid=1',
                  dataType: 'html',
                  async: false}).responseText;
          }
      }).hover(function (e) {
          $(this).popover('toggle');
      });
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="label label-default" style="background-color: orange; font-size: x-large" data-poload="ajax/ajaxpopoverstat.php" id="xword"  onmouseover="Popx(this.id)"&gt;Suggested Word&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>any help?</p>