fetching event as json in FullCalendar error: undefined fonction near $ajax

fetching event as json in FullCalendar error: undefined fonction near $ajax

我想在 FullCalendar 中添加一些海关事件,每次我尝试使用 Ajax 或 Json events 我都会收到此错误

Uncaught TypeError: undefined is not a function near (...$.ajax...)

这是我的 FullCalendar 的 javascript 代码:

$(function() {

    // page is now ready, initialize the calendar..

    $('#calendar').fullCalendar({
        themeSystem: 'bootstrap4',
        header:{
            left: 'month,agendaWeek,agendaDay',
            center: 'title',
            right: 'prev,today,next'
        },
        defaultView: 'month',
        weekNumbers: true, 
        weekNumberTitle: "Week",
        slotLabelFormat: 'H:mm',
        nowIndicator: true,
        navLinks: true,

        events: getEvents
    });
});

最后我发现我正在加载 Jquery 的精简版(我想是一个糟糕的 cut/paste 操作),它不包含 ajax 功能。

希望对大家有所帮助