将 Facebox 添加到 FullCalendar 活动
我一直在尝试让 FullCalendar 事件使用 Facebox 在单击事件时弹出信息。我可以毫无问题地将事件放在日历上或获取需要显示的信息,只是让弹出框正常工作。
我尝试将 rel="facebox" 添加到包含事件标题的“span”和“a”,但似乎都没有影响它。
如果有人以前尝试过此操作或知道可能的解决方案,我期待收到您的来信。
I have been trying to make the FullCalendar events use Facebox to pop up with information when they are clicked. I have no problem putting the events on the calendar or getting the information that needs to be displayed it is just getting the pop up box to work.
I have tried adding rel="facebox" to both the "span" and the "a" that wraps the event title but neither seem to affect it.
If anyone has tried this before or knows a possible solution I look forward to hearing from you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从 fullCalendar eventClick 文档页面复制并扩展了示例:
哦,如果您想要获取任何其他
calEvent
对象,请查看 fullCalendar 事件对象页面。如果您使用 Google 日历扩展程序,可能还会有更多信息,包括description
和location
I copied and expanded the example from the fullCalendar eventClick document page:
Oh, and if you want to get any of the other
calEvent
objects, look at the fullCalendar event object page. There could be more if you are using the google calendar extension, includingdescription
andlocation
这可能与 Facebook 的工作方式有关。我认为它可能只在页面的初始加载时运行 - 因此当您将这些添加到新元素时,facebox 代码已经运行并且新元素无法识别。
如果您使用它来启动facebox:
那么就是这种情况。您应该向 eventRender 方法添加一些内容,以便在渲染事件时调用 Facebox 方法,该方法将它们实例化为 Facebox 元素。
来自 http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/ :
但是您可以使用带有适当参数的“element.facebox”来代替“element.qTip”。您可能还需要设置 href。
It might have something to do with the way facebox works. I think it might only run on the initial load of the page - so when you add these to new elements the facebox code has already run and the new elements are not recognized.
If you are using this to initiate facebox:
Then that is the case. You should add something to the eventRender method so that as events are rendered you call the facebox method on then, which instantiates them as facebox elements.
From http://arshaw.com/fullcalendar/docs/event_rendering/eventRender/:
But instead of "element.qTip" you would use "element.facebox" with the proper arguments. You may need to set an href too.