I recently created a website that utilizes a router system for ajax page loading. The site is built with webpack and organized as ES6 JavaScript modules. Although I have integrated some third-party jQuery plugins, they seem to only work properly when the page is refreshed.
My main concern is how to reload or reinitialize these third-party jQuery plugins and scripts using ES6 JS after an ajax page load.
One specific example is the Elevate Zoom plugin which I use for image zoom functionality. Upon navigating to another page on the site that uses this plugin, the zoom feature malfunctions and requires a page refresh to work again.
$("#img_01").elevateZoom();
Is there a solution similar to the one outlined below?
import { component } from 'picoapp';
// import elevate zoom
// import jQuery
export default component(() => {
// reinitialize plugin here?
//$("#img_01").elevateZoom();
})