Reputation:
I'm using bootstrap and I was wondering how I can wait until a popover is destroyed before showing another element?
Here's the popover destroy call:
$('.first').popover('destroy');
I've tried doing the following, but it doesn't seem to actually make it to the second call:
$('.first').popover('destroy', function() {
$('.second').popover('show');
});
Upvotes: 0
Views: 326
Reputation: 29073
Does this do what you want? It waits for the popover to be hidden, not necessarily destroyed. There is no built in bootstrap event for destruction.
$('.first').on('hidden.bs.popover', function() {
$('.second').popover('show');
});
$('.first').popover('destroy');
Upvotes: 2