2011-04-02 75 views
1

我是新來的。 我已經做了一些谷歌搜索,但似乎無法找到我的問題的答案。 我正在用fullcalendar使用qtip。一切工作起初,但每次我改變fullcalendar上的意見,例如每月一次又回到月份或當我切換月,qtip似乎並沒有工作。我需要刷新頁面才能使qtip工作。請幫幫我。更改日曆視圖後,Qtip無法與fullcalendar配合使用

$(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' 
     }, 
    width: 300 
    } 
    }); 
}); 

回答

1

DOM改變的qtip事件失去了約束力。你必須使用現場方法來解決這個問題。

這裏是一個工作示例,將鼠標懸停在田間地頭,http://jsfiddle.net/GxXrW/8/

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

哇,並獲得成功。非常感謝伴侶:) – sixty6 2011-04-03 02:16:17