"><img> to paste in an image
Hi,
Sorry for the late reply.
In our HTML version, our components are initialized within the load
event. However, in NextJs versions, content is rendered differently, and to use our JavaScript components, you'll need to move the initialization from the load
event to the useEffect
hook.
All components in HTML version are initialized in js/components/_init.js, you can move this initialization into useEffect
as shown below:
useEffect(() => {
KTComponents.init();
});
as far as I know, the codes you mention above are functions from jQuery (cause you got that code from HTML), you need to build from scratch if you want to build using next.js, and maybe some of the plugins are not available (the plugins only support jquery not for react).