You can use the container
option on the tooltip()
. This will append the popover to the parent row
and not impact the style of list-group
..
$('.list-group-item').tooltip({container:'.row'})
Question
Problem:
I have a Bootstrap panel that contains a list group. The panel's bottom border is disappearing if I add a tooltip to the last list group item.
Solution attempts:
I suspect one of two issues may be causing this:
I started to suspect #2 because of the following in the bootstrap css:
.panel>.list-group:last-child .list-group-item:last-child {
border-bottom:0;
border-bottom-right-radius:3px;
border-bottom-left-radius:3px
}
Because the tooltip adds another element to the list group, the list group item is no longer the last child, so this rule ceases to apply. However, after changing .list-group-item:last-child
to .list-group-item:last-of-type
which would effectively ignore the tooltip, the problem still exists.
Solution
You can use the container
option on the tooltip()
. This will append the popover to the parent row
and not impact the style of list-group
..
$('.list-group-item').tooltip({container:'.row'})