0

ユーザーがホバーしたときにポップオーバーを表示し続ける方法があるかどうか疑問に思っています(つまり、トリガー要素だけでなく、ポップオーバー自体も)?

私の場合、私は私の中にリンクを持っていますpopover contentが、ユーザーはそれをクリックすることはできませpopoverん.hoverhover trigger

4

1 に答える 1

0

トリガーを使用したソリューションはまだ見たことがありません。これは、この質問のトリガーを使用しhoverた私のソリューションですmanual

$('.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);
    });
于 2013-09-01T09:30:39.013 に答える