将popover改为悬停

时间:2018-01-25 12:03:19

标签: javascript jquery asp.net

$(document).ready(function () {
    Address.initialize();
    Note.initializeIndex();
    Child.initializeEditBillPayer();
    AuditLog.Initialise();
    if ($(".aged-debetors").length !==0) {
        // set the contant of the popover when document is loaded
        $("[data-toggle=popover]").popover();
        $('.aged-debetors-label').attr("data-content", $(".aged-debetors").html());
    }
});


<span class="label label-info aged-debetors-label" data-toggle="popover" data-placement="auto right" data-html="true" data-content="" data-original-title="" title="">
    Current Balance: @Html.DisplayFor(modelItem => Model.TotalUnpaidAmount)
</span>

1 个答案:

答案 0 :(得分:0)

您可以在hover上触发弹出窗口,而不是默认click触发器,如:

$("[data-toggle=popover]").popover({ trigger: 'hover' });