Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将附加HREF链接附加到jQuery fullcalendar_Fullcalendar - Fatal编程技术网

将附加HREF链接附加到jQuery fullcalendar

将附加HREF链接附加到jQuery fullcalendar,fullcalendar,Fullcalendar,我正在尝试向jQuery fullcalendar实现中的每个事件附加一个附加链接。但是,以下代码基本上不会产生任何结果: eventRender: function(event, element) { $(element).find("a.fc-event").after($('<a href="/TEST">link</a>').html("link")); } 任何帮助都将不胜感激。您可能需要将其附加到.fc事件标题中 大概是这样的: eventRende

我正在尝试向jQuery fullcalendar实现中的每个事件附加一个附加链接。但是,以下代码基本上不会产生任何结果:

eventRender: function(event, element) {
    $(element).find("a.fc-event").after($('<a href="/TEST">link</a>').html("link"));
}

任何帮助都将不胜感激。

您可能需要将其附加到.fc事件标题中

大概是这样的:

eventRender: function(event, element) {
    var eventText = element.find('span.fc-event-title').text() + "<a href='/TEST'>link</a>";
    element.find('span.fc-event-title').html(eventText);
}

希望有帮助

要清楚,每个事件都是一个html元素,带有样式。我想为每个活动增加一个元素。因此,基本上每个事件都会有两个链接回我传递回的任何URL。我认为这很可能会起作用,但我最终遵循了他们网站上的qtip示例,并使用content:部分嵌入HREF。谢谢