0

I m wondering if there is a way to keep the popover displaying when the user hover on it (i mean, not only the trigger element but the popover itself)?

In my case, i have a link inside my popover content, but the user can't click it, because the popover hides itself when leaving the hover trigger elelement(hover trigger)...

Ludo
  • 5,060
  • 15
  • 53
  • 85
  • Possible duplicate of [**Solved** How can I keep bootstrap popover alive while the popover is being hovered?](http://stackoverflow.com/questions/15989591/solved-how-can-i-keep-bootstrap-popover-alive-while-the-popover-is-being-hov). You'll find your answer there – Itay Sep 01 '13 at 08:05

1 Answers1

0

I haven't seen any solution yet with hover trigger here is my solution with manual trigger from this question

$('.selector').popover({
        html: true,
        trigger: 'manual',
        container: $(this).attr('id'),
        placement: 'top',
        content: function () {
            $return = '<div class="hover-hovercard"></div>';
        }
    }).on("mouseenter", function () {
        var _this = this;
        $(this).popover("show");
        $(this).siblings(".popover").on("mouseleave", function () {
            $(_this).popover('hide');
        });
    }).on("mouseleave", function () {
        var _this = this;
        setTimeout(function () {
            if (!$(".popover:hover").length) {
                $(_this).popover("hide")
            }
        }, 100);
    });
Community
  • 1
  • 1
vikas devde
  • 11,691
  • 10
  • 35
  • 42