如何动态创建bootstrap的弹出窗口

时间:2017-06-09 20:09:35

标签: javascript jquery twitter-bootstrap popover

我正在尝试创建一个包含将由三个元素触发的弹出窗口的函数,只会更改放置和内容。 下面的代码仅适用于第一个参数,我做错了什么?

    'loop through each row
    For X As Integer = 1 To 1000
        'check if the cell value matches the search string.
        If xlWorkSheet.Cells(X, 9).value = "Removed" And xlWorkSheet.Cells(X, 10).value = "Dispute" Then
            xlWorkSheet.Cells(X, 10).Replace("Dispute", "I have been replaced")
        End If
    Next

函数调用:

function popTeste(arguments) {
    var args = Array.from(arguments);
    args.forEach(function (e, i) {
        console.log(e);
        $('body').popover({
            selector: e.selector
            , trigger: e.trigger || 'hover'
            , placement: e.placement || 'top'
            , html: true
            , container: 'body'
            , title: e.title || 'Info - ' + (i + 1) + '</i>'
            , template: '<div class="popover popInfoFunc' + i + '" role="tooltip" style="height: 161px"><div class="arrow"></div><h3 class="popover-title" style="height: auto; padding: 5px;"><i></i></h3><div class="popover-content" style="width: 400px; padding: 5px 5px 0px 5px;"></div></div>'
            , content: '<div id="' + i + '"><i id="spinnerPopover" style="margin: 40px 0px 0px 186px" class="fa fa-spinner fa-spin fa-2x"></i></div>' //dynamic content loaded by AJAX

        });
    });
}

0 个答案:

没有答案