Dynamically add a class to Bootstrap’s ‘popover’ container

You can do this without hacking Bootstrap and without changing the template either, by grabbing the popover object from the caller’s data and accessing its $tip property.

$('a[rel=popover]')
  .popover({ placement: 'bottom', trigger: 'hover' })
  .data('bs.popover')
  .tip()
  .addClass('my-super-popover');

Leave a Comment