I'm trying to apply the PerfectScrollbar
on FullCalendar
but I sadly got:
PerfectScrollbar is not a function
that's weird because in other place of my application the PerfectScrollbar
is successful applied.
This is my implementation for FullCalendar
:
$calendar = $('#fullCalendar');
$calendar.fullCalendar({
viewRender: function(view, element) {
// We make sure that we activate the perfect scrollbar when the view isn't on Month
if (view.name != 'month') {
$(element).find('.fc-scroller').perfectScrollbar();
}
}, ...
what I did wrong?
UPDATE:
This doesn't display the error:
var scroller = $(element).find('.fc-scroller')[0];
var ps = new PerfectScrollbar(scroller, {
wheelSpeed: 2,
wheelPropagation: true,
minScrollbarLength: 20,
suppressScrollX: true
});
but doesn't show the PerfectScrollBar