开发者

Qtip does not work with fullcalendar after changing the calendar views

开发者 https://www.devze.com 2023-02-21 06:22 出处:网络
I am new here. I\'ve done some googling but cant seem to find the answer to my problem. I\'m using qtip with fullcalendar. Everything works fine at first, but every time I changed the views on fullcal

I am new here. I've done some googling but cant seem to find the answer to my problem. I'm using qtip with fullcalendar. Everything works fine at first, but every time I changed the views on fullcalendar e.g from month to day and back to month again or when I switched month, qtip doesn't seem to work. I need to refresh the page in order to make qtip work. Please help me.

$(document).ready(function() {

    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },              
        events: [ <?php include("events.php"); ?>]
});

$('.fc-event').qtip({
    content: 'Content',
    show: { when: { event: 'click' } },
    hide: { when: { event: 'unfocus'} },
    style: { 
        name: 'blue',
        border: {
           width: 2,
           radius: 2,
           color: '#6699CC'
        开发者_JS百科},
    width: 300
   }
   });
});


When DOM changes the qtip event loses its binding. You have to use the live method to solve that problem.

Here is a working example, hover over the fields, http://jsfiddle.net/GxXrW/8/

$('.fc-widget-content').live('mouseover', function(event){
        $(this).qtip({
           //your setup
        });
 });
0

精彩评论

暂无评论...
验证码 换一张
取 消