const $ = require('jquery'); class TimelineSwitch { constructor(section) { } swapTimeline(id) { } } $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () { $('.timeline-switch:not(.initiated)').each((i, el) => { new TimelineSwitch($(el)); }) })