@brx wrote:
It is recommended to insert jQuery elements like this in a component:
this.$().fullCalender
I tried this but always get “fullcalendar is not a function”.
If inserted without ‘this’, it’s working as expected:
component JS:
export default Component.extend({ didInsertElement() { $('.jquerycal').fullCalendar({ events: this.get('events') }, willDestroyElement() { $('.jquerycal').fullCalendar().destroy(); } });
component template:
<div class="jquerycal"></div>
I noticed that …
$().fullCalendar
… without an selector will also not work.
I included fullcalender with app.import:
app.import('vendor/plugins/fullcalendar/fullcalendar.min.js');
Posts: 2
Participants: 2