拖动事件

时间:2016-02-02 09:05:46

标签: javascript jquery fullcalendar qtip qtip2

在周或日视图中拖动活动时。随机地,qtips将被渲染,旧的仍在屏幕上。

enter image description here

我一直在使用api禁用qtips,但没有任何结果。以下是我对fullcalendar事件呈现事件的qtip配置:

eventRender = function (event, element) {
    $(element).qtip(
        {
            content: '<div>Hello, World!</div>',
            position: {
                target: 'mouse', // Track the mouse as the positioning target
                adjust: { x: 5, y: 5 } // Offset it slightly from under the mouse
            },
            style: 'qtip-light'
        }
    );
}

1 个答案:

答案 0 :(得分:3)

@Ibrahim,使用eventAfterRender函数。它对我有用。

eventAfterRender: function( event, element, view ) {
    $(element).qtip(
    {
        content: '<div>Hello, World!</div>',
        position: {
            target: 'mouse', // Track the mouse as the positioning target
            adjust: { x: 5, y: 5 } // Offset it slightly from under the mouse
        },
        style: 'qtip-light'
    });
}