带Twitter Twitter Bootstrap Popover的Fullcalendar [英] Fullcalendar with Twitter Bootstrap Popover

查看:290
本文介绍了带Twitter Twitter Bootstrap Popover的Fullcalendar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Fullcalendar与twitter boostrap popovers一起工作。

如果我点击一个事件,我想在popover中显示一些细节。

所以首先添加了这个律片段到Fullcalendar:

I am trying to get Fullcalendar working with twitter boostrap popovers.
if I click an event, i want to show some details in the popover.
So first added this lil snippet to Fullcalendar:

eventClick: function(event, jsEvent, view) {
        $this = $(this);
        $this.popover({html:true,title:event.title,placement:'top'}).popover('show');
        return false;            
    },

但是现在我遇到了两个问题:

But now I run into 2 problems:


  1. Fullcalendar位于具有溢出的div中:隐藏或其他内容,因为弹出窗口在Fullcalendar的边界上被切断。我如何解决这个问题?

  2. 与问题2类似,我想通过函数在顶部,左侧,右侧或底部放置弹出窗口,具体取决于事件在Fullcalendar中的位置格。我怎么做这样的功能?

谢谢!

thanks!

推荐答案

从版本2.3开始,bootstrap现在有一个容器选项用于将弹出窗口附加到特定元素。

From version 2.3 bootstrap now has a "container" option for popovers which appends the popover to a specific element.

只需添加 {container:'body'} 将其附加到body

just add {container:'body'} to append it to the body

$this.popover({html:true,title:event.title,placement:'top',container:'body'}).popover('show');

这篇关于带Twitter Twitter Bootstrap Popover的Fullcalendar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆