Skip to content

Instantly share code, notes, and snippets.

@pplante
Created July 31, 2013 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pplante/6126587 to your computer and use it in GitHub Desktop.
Save pplante/6126587 to your computer and use it in GitHub Desktop.
<a class="btn">My Button</a>
$('.btn').popover({
container: 'body',
content: 'my content',
trigger: 'manual'
});
// Since we're controlling the popover lifecycle, we need to show it.
$('.btn').popover('show');
// Now its time to kill it, later in our code
$('.btn').popover('destroy');
// If we call show again, the popover content is broken:
$('.btn').popover('show');
// So we have to call removeData to clean up after bootstrap
$('.btn').removeData('bs.popover');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment