meetergo / meetergo-integration

MIT License
5 stars 3 forks source link

Dynamic buttons do not trigger modal in Meetergo integration #22

Open dennislizarzaburu opened 1 day ago

dennislizarzaburu commented 1 day ago

The current implementation of the Meetergo integration script does not handle dynamically added buttons with the class meetergo-modal-button. Buttons added to the DOM after the script has initialized do not trigger the modal functionality because the necessary event listeners are not applied.

  1. Implement global event listeners that listen for clicks on elements with the meetergo-modal-button class, regardless of when they are added to the DOM.
  2. Provide a custom reinitialization method (e.g., Meetergo.init() or Meetergo.bind()) that developers can call to reapply the event listeners to newly added elements.
boy51 commented 22 hours ago

Hi! That’s a great observation—thank you for pointing it out. Adding a global event listener would definitely improve the flexibility of the script. If you’d like, feel free to submit a PR with your proposed solution.