You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using bootstrap 3.1.1 - I've added the function to hide all popovers other than the one selected, but for some reason the previous popover remains open when I click a new one
This is the code I'm adding:
$(function () {
$("[data-toggle='popover']").popover();
$('.popover-toggle').popover('toggle');
$('body').on('click', function (e) {
$('[data-toggle="popover"]').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
$(this).popover('hide');
}
});
});
});
Using bootstrap 3.1.1 - I've added the function to hide all popovers other than the one selected, but for some reason the previous popover remains open when I click a new one
This is the code I'm adding:$(this).has(e.target).length === 0 && $ ('.popover').has(e.target).length === 0) {
$(function () {
$("[data-toggle='popover']").popover();
$('.popover-toggle').popover('toggle');
$('body').on('click', function (e) {
$('[data-toggle="popover"]').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$(this).is(e.target) &&
$(this).popover('hide');
}
});
});
});
Any idea how to fix @tarlepp or @dkleehammer ?
The text was updated successfully, but these errors were encountered: