TypeError: document.on is not a function
ROR newbie here. I am trying to use FullCalendar with ROR 3.2.11 on Ubuntu 12. I downloaded a working example and confirmed that the calendar metric is displayed in the sample application. However, this is not in my application. I installed Firebug to see if there are JavaScript errors, and there are 2:
TypeError: document.on is not a function <location rails.js:128>
TypeError: $(...).fullCalendar is not a function <location calendar.js:48>
I don't understand what the errors mean. Keep in mind that I didn't write these Java scripts, so I don't understand them.
Hope someone ran into this error and a solution can help.
source to share
$(document).on()
is a jQuery construct (see http://api.jquery.com/on/ ). $(...).fullCalendar()
also smells like a jQuery plugin. The jQuery link is earlier in your page (see https://developers.google.com/speed/libraries/devguide#jquery ) and it should light up.
source to share