cotton123236 / zoomist

Zoomist is a library built with TypeScript that allows you to create zoom elements on website quickly and easily.
https://zoomist.vercel.app/
MIT License
110 stars 23 forks source link

Not working with multiple instances on one page #44

Closed dannitoma closed 5 months ago

dannitoma commented 6 months ago

Hi! It all works great when there's only one zoomist container on the page, but once I add multiple instances it doesn't seem to work. Would you able to help? Thanks.

cotton123236 commented 6 months ago

Hey there, this is the way for multiple zoomist

document.querySelectorAll('.zoomist-container').forEach(container => {
  new Zoomist(container, { ... })
})