qtip在fullcalendar中出现多次

时间:2015-10-09 09:36:05

标签: jquery fullcalendar qtip2

我在fullcalendar中实现了qtip2以下是我编写的用于渲染工具提示的代码

eventRender: function (event, element) {
        element.find('.fc-title').append("<br/>" + event.shiftname);
        element.qtip({
            content: {
                text: function (api) {
                    var content = event.description;
                    if (content != '')
                        return content;
                }
            },
            position: { viewport: true },
            style: { classes: 'qtip-custom' },
        });
    }

当鼠标悬停在事件上时出现。但是当我调整事件大小时,qtip会多次出现。 enter image description here

1 个答案:

答案 0 :(得分:1)

我在qtip中添加了show:{solo:true}选项

            element.qtip({
            content: {
                text: function (api) {
                    var content = event.description;
                    if (content != '')
                        return content;
                }
            },
            position: { viewport: true },
            style: { classes: 'qtip-custom' },
            show: { solo: true }
        });

这解决了我的问题。

相关问题