Fullcalendar 4的工具提示悬停问题

时间:2019-10-04 10:51:00

标签: jquery css fullcalendar tooltip fullcalendar-4

我正在使用全日历4。当您将鼠标悬停在某个事件上时,它会显示一个工具提示,但是由于某些原因,当我放下该事件时,该工具提示会丢失其位置并显示在屏幕的左上方。

启用鼠标悬停时显示的提示:

eventMouseEnter: function (info) {
showTooltip(info);                     
},
eventMouseLeave: function (info) {                         
hideTooltip(info);         
},

然后使用功能showTooltip:

var showTooltip = function(info) {

        var tis = info.el;

        var tooltip     = '<div class="tooltip_entregas">';
            tooltip    += '<h2>'+info.event.title+'</h2>';

            var $tooltip = $(tooltip).appendTo('body');

            $(tis).mouseover(function (e) {            

                $(tis).css('z-index', 10000);
                $tooltip.fadeIn('500');
                $tooltip.fadeTo('10', 1.9);

            }).mousemove(function (e) {

                $tooltip.css('top', e.pageY + 10);
                $tooltip.css('left', e.pageX + 20);

            });

 }

0 个答案:

没有答案