How can I hold Twitter Bootstrap Popover open until my mouse moves into it?

前端 未结 16 1409
野性不改
野性不改 2020-12-04 05:55

I have a link that uses the Twitter Bootstrap Popover version 1.3.0 to show some information. This information includes a link, but every-time I move my mouse from the link

16条回答
  •  长情又很酷
    2020-12-04 06:48

    Solution worked for us for Bootstrap 3.

    var timeoutObj;
    $('.list-group a').popover({
        offset: 10,
        trigger: 'manual',
        html: true,
        placement: 'right',
        template: '

    ' }).mouseenter(function(e) { $(this).popover('show'); }).mouseleave(function(e) { var _this = this; setTimeout(function() { if (!$(".popover:hover").length) { $(_this).popover("hide"); } }, 100); });

提交回复
热议问题