click event Uncaught RangeError:超出最大调用堆栈大小

时间:2016-03-23 11:32:48

标签: jquery twitter-bootstrap

如何在同一事件中创建andfire bootstrap popover?

 $('.btShowWkf').mouseover(function(e){
        debugger;
        e.stopImmediatePropagation();
        //var el= e.target;
        $(this).popover({
            id: "customPop",
            title: "QUAD-HCM Popover",
            html: true,
            content: function () {
                return '<span style="color:red;font-size:1.3em;">WOKFLOW</span><br><span style="color:darkgrey;">YESSSSSS.</span>';
            },
            container: 'body',
            fontColor: "#000",
            borderColor: "#000",
            backgroundColor: "#000",
            onCreate: null,
            onVisible: null,
            childToAppend: null,
            keepData: false,
            disableHeader: false,
            trigger: "click",
            placement: "top"
        });
        $(this).trigger('click');
        myTableName.workflowLabels(null,$(this));


    });

我需要使用相同的单击事件来创建和触发,因为它涉及许多行以及性能和内存,并且不希望一次附加所有弹出窗口。 感谢。

1 个答案:

答案 0 :(得分:1)

$('.btShowWkf').mouseover(function(e){    
     $(this).popover({
            id: "customPop",
            title: "QUAD-HCM Popover",
            html: true,
            content: function () {
                return '<span style="color:red;font-size:1.3em;">WOKFLOW</span><br><span style="color:darkgrey;">YESSSSSS.</span>';
            },
            container: 'body',
            fontColor: "#000",
            borderColor: "#000",
            backgroundColor: "#000",
            onCreate: null,
            onVisible: null,
            childToAppend: null,
            keepData: false,
            disableHeader: false,
            placement: "top"
    });
    $(this).popover("show");
});