Site icon Hip-Hop Website Design and Development

Assist wiht including fullcalendar.io to a WordPress web page

I have been making an attempt so as to add this calendar to my wordpress web page. And I’ve adopted the documentation, nevertheless it’s nonetheless not exhibiting up. That is what I’ve achieved.

I first added this to my baby theme capabilities file:

operate fullcalendar_jquery_enqueue() {
    wp_register_script('fullcalendar', "https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js", false, null, true);
    wp_enqueue_script('fullcalendar');
}
add_action("wp_enqueue_scripts", "fullcalendar_jquery_enqueue", 11);

operate load_styles() {
    wp_register_style('fullcalendarcss', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css');
    wp_register_style('fullcalendarprintcss', 'https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.print.css');
    wp_enqueue_style( 'fullcalendarcss');
    wp_enqueue_style( 'fullcalendarprintcss');
}
add_action('wp_print_styles', 'load_styles');

Then I added this JS to my customized.js file:

jQuery(doc).prepared(operate ($) {
    var calendar = jQuery('#calendar').fullCalendar({
        editable: true,
    });
});

After which I added <div id='calendar'></div> to one in every of my pages, however the calendar shouldn’t be exhibiting up. Within the console, it is exhibiting “Uncaught TypeError”.

Can somebody please have a look and let me know what I is likely to be doing incorrect? Thanks!