Created
July 31, 2013 22:02
-
-
Save pplante/6126587 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a class="btn">My Button</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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