title: Dynamically add a class to Bootstrap's 'popover' container
body: <p>I've thoroughly searched through both StackOverflow and Google, but come up empty. So apologies in advance if this has been asked &amp; resolved already.</p>
  
  <p><strong>NB:</strong> I'm a newbie at jQuery, so I'm not sure how to write this up myself. I'm sure this is an easy snippet of code, but can't wrap my head around it.</p>
  
  <p>What I'm looking to do is use a <code>data-</code> element (eg: <code>data-class</code> or similar) to attach a new class (Or ID, I'm not picky anymore!) to the top-level popover <code>&lt;div&gt;</code>. The code I currently have is as follows:</p>
  
  <p><em>jQuery:</em></p>
  
  <pre><code>$('a[rel=popover]')
      .popover({
          placement : 'bottom',
          trigger : 'hover'
      })
      .click(function(e) {
          e.preventDefault()
      });
  </code></pre>
  
  <p><em>HTML:</em></p>
  
  <pre><code>&lt;a href="" rel="popover" data-class="dynamic-class" title="Title goes here" data-content="Content goes here"&gt;
  </code></pre>
  
  <p>And ideally the kind of HTML I would have spit out, is something like this:</p>
  
  <pre><code>&lt;div class="popover ... dynamic-class"&gt;
      &lt;!-- remainder of the popover code as per usual --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Is this something I can do? The documentation on the bootstrap site for popovers is a bit sparse, so it's taken me a while just to get to this point, unfortunately :(</p>
  
  <p>Thanks in advance for any &amp; all responses!</p>