gpt4 book ai didi

twitter-bootstrap - Arshaw fullcalendar & twitter bootstrap Popover(如何通过点击外部来关闭弹出窗口?)

转载 作者:行者123 更新时间:2023-12-04 07:48:50 24 4
gpt4 key购买 nike

我找到了以下示例,它显示了我需要的弹出窗口的行为: How to dismiss a Twitter Bootstrap popover by clicking outside?

但是,有谁知道如何在 fullcalendar 中实现类似的行为?(即全日历事件)谢谢。

最佳答案

实际上我想我找到了解决问题的办法:

$('#calendar').fullCalendar({
eventRender: function (event, element) {
if (!event.url)
{
element.popover({
placement: 'bottom',
html:true,
title: 'text',
content: 'text
});

$('body').on('click', function (e) {
if (!element.is(e.target) && element.has(e.target).length === 0 && $('.popover').has(e.target).length === 0)
element.popover('hide');
});
}
}

});

这似乎在 fullcalendar 中运行良好。

谢谢。

关于twitter-bootstrap - Arshaw fullcalendar & twitter bootstrap Popover(如何通过点击外部来关闭弹出窗口?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16326795/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com