I want to close popover automatically after a delay time. but its showing an error error image
$('#prev_button').popover('show');
$('#prev_button').on('shown.bs.popover', function() {
var $pop = $(this);
setTimeout(function() {
$pop.popover('destroy');
}, 1000);
});
bootstrap.bundle.js is included to ensure popover method works. Can't figure out a solution
PS: using v4.1 bootstrap
Use the popver(“detroy”) to destroy the popover.
The Popover plugin is similar to tooltips; it is a pop-up box that appears when the user clicks on an element. The difference is that the popover can contain much more content. Click To Toggle Popover Click To Toggle Popover. Tip: Plugins can be included individually (using Bootstrap's individual "popover.
As of version 4.1, the method destroy
has been replaced by dispose
. You can find more details here.
$pop.popover('dispose');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With