gpt4 book ai didi

javascript - 有没有办法将鼠标悬停上的个人文本添加到全日历

转载 作者:行者123 更新时间:2023-12-01 02:00:55 25 4
gpt4 key购买 nike

我正在尝试将个人文本添加到全日历内的鼠标悬停位置。下面的脚本仅适用于事件的标题。示例:JS Fiddle Example 。请问如何让鼠标悬停时显示我的个人文本。

JavaScript

$(document).ready(function() {

var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();

$('#calendar').fullCalendar({
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,

// add event name to title attribute on mouseover
eventMouseover: function(event, jsEvent, view) {
if (view.name !== 'agendaDay') {
$(jsEvent.target).attr('title', event.title);
}
},

// For DEMO only
// *************
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1)},
{
title: 'Long Event',
start: new Date(y, m, d - 5),
end: new Date(y, m, d - 2)},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d - 3, 16, 0),
allDay: false},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d + 4, 16, 0),
allDay: false},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false},
{
title: 'Birthday Party',
start: new Date(y, m, d + 1, 19, 0),
end: new Date(y, m, d + 1, 22, 30),
allDay: false},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'}
]
});

});​

最佳答案

您可以使用 eventRender 回调来执行此操作。

检查这个 fiddle :http://jsfiddle.net/100thGear/h9cC6/

请告诉我这是否有帮助!

关于javascript - 有没有办法将鼠标悬停上的个人文本添加到全日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12258298/

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