本文介绍了eventClick与lightBox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谢谢!
如何在eventClick中打开lightBox,我实际上最终使用了fancybox,并且我设法使它工作的方式是使用 eventAfterRender 来绑定它。解决方案谢谢!
如何在eventClick中打开lightBox,我实际上最终使用了fancybox,并且我设法使它工作的方式是使用 eventAfterRender 来绑定它。解决方案 $('#calendar')。fullCalendar({
eventAfterRender:function(event,element,view ){
if(event.url){
$('a',$(element))。fancybox({
type:'ajax'
});
}
}
});
How I can open lightBox in eventClick, I need init a lightBox whe I click in a event.
Thanks!!
I actually ended up using fancybox and the way I managed to get it working was to use the eventAfterRender to bind it up. I didn't have to do anything to the eventClick to prevent url follow, I think fancybox took care of that. It didn't work when I performed this same wire up in the eventClick so you might want to follow this example with lightbox and see if that works for you as well. Here is the relevant part of what I did. Cheers!
$('#calendar').fullCalendar({
eventAfterRender: function(event, element, view ) {
if(event.url) {
$('a',$(element)).fancybox({
type: 'ajax'
});
}
}
});
这篇关于eventClick与lightBox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!