javascript - TypeError: t(...).on is not a function on fullcalendar - Stack Overflow

admin2025-04-22  0

fullcalendar is throwing an error:

TypeError: t(...).on is not a function fullcalendar.min.js:8:11264

This are my script/css includes:

<script type="text/javascript" src=".6.2/jquery.min.js"></script>
<script src=".8/jquery-ui.min.js"></script>
<script src=".js/2.9.0/moment.min.js"></script>
<script type="text/javascript" src=".3.1/fullcalendar.min.js"></script>
<link href=".8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href=".3.1/fullcalendar.min.css" rel="stylesheet" type="text/css"/>
<link href=".3.1/fullcalendar.print.css " rel="stylesheet" type="text/css"/>

And this is the page where I want to use fullcalendar:

<script>
   $(document).ready(function() {

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

        $('#calendar').fullCalendar({
            // put your options and callbacks here
        })

    });
</script>

Very basic, I just used the code from the documentation page. So my guess is that I've done something wrong with the tags.

Edit: I changed to use the non-minified version of fullcalendar. The error message changed to:

TypeError: $(...).on is not a function fullcalendar.js:6912:2

When I click on that error it shows:

$(document).on('mousedown', this.documentMousedownProxy);

In the function:

bindGlobalHandlers: function() {
    $(document).on('mousedown', this.documentMousedownProxy);
},

fullcalendar is throwing an error:

TypeError: t(...).on is not a function fullcalendar.min.js:8:11264

This are my script/css includes:

<script type="text/javascript" src="http://ajax.googleapis./ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://ajax.googleapis./ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare./ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare./ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>
<link href="http://ajax.googleapis./ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="http://cdnjs.cloudflare./ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css" rel="stylesheet" type="text/css"/>
<link href="http://cdnjs.cloudflare./ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css " rel="stylesheet" type="text/css"/>

And this is the page where I want to use fullcalendar:

<script>
   $(document).ready(function() {

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

        $('#calendar').fullCalendar({
            // put your options and callbacks here
        })

    });
</script>

Very basic, I just used the code from the documentation page. So my guess is that I've done something wrong with the tags.

Edit: I changed to use the non-minified version of fullcalendar. The error message changed to:

TypeError: $(...).on is not a function fullcalendar.js:6912:2

When I click on that error it shows:

$(document).on('mousedown', this.documentMousedownProxy);

In the function:

bindGlobalHandlers: function() {
    $(document).on('mousedown', this.documentMousedownProxy);
},
Share Improve this question edited Apr 1, 2015 at 14:38 Mathias Maes asked Apr 1, 2015 at 14:31 Mathias MaesMathias Maes 5011 gold badge8 silver badges17 bronze badges 3
  • 5 use the non-minified version of the plugin for a better error message. – Kevin B Commented Apr 1, 2015 at 14:33
  • 1 But even without that, the error is clearly $.fn.on is undefined, which is expected with the version of jQuery you are using. Upgrade jquery, or downgrade the plugin. – Kevin B Commented Apr 1, 2015 at 14:38
  • I have changed to the non-minified version. I will upgrade jquery to test. – Mathias Maes Commented Apr 1, 2015 at 14:40
Add a ment  | 

1 Answer 1

Reset to default 1

The ment of Kevin B was the solution. I had to upgrade my jquery version.

I changed the jquery script to <script src="https://ajax.googleapis./ajax/libs/jquery/2.1.3/jquery.min.js"></script> and it works.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745304922a295480.html

最新回复(0)