更改日历视图后,Qtip 无法与 fullcalendar 一起使用
我是新来的。 我已经做了一些谷歌搜索,但似乎无法找到我的问题的答案。 我将 qtip 与 fullcalendar 一起使用。一开始一切正常,但每次我更改 fullcalendar 上的视图时,例如从月到日,再回到月,或者当我切换月份时,qtip 似乎不起作用。我需要刷新页面才能使 qtip 工作。请帮我。
$(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
}
});
});
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'
},
width: 300
}
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当 DOM 更改时,qtip 事件将失去其绑定。您必须使用live方法来解决该问题。
这是一个工作示例,将鼠标悬停在字段上,http://jsfiddle.net/GxXrW/8/
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/