So this is the second time I have a problem with a repeater with buttons with a onClick event. I’m currently making a custom date picker for a booking system, and when I empty the repeater and then re-populate it, it triggers the old onClick event and the new one I just created, which really messes with the logic. I managed to fix it previously but now I can’t.
In jquery you can unbind all the events associated with an element but velo doesn’t have anything like that.
Your problems is very, very probable, that you register the onClick()-event more than once., like every time you populate the repeater. If you refister an event listener more than once (although under same name), it WILL run twice.
Solution: do not register it twice. Just register your onClick() once and only once (like calling a function registerEvents() from $w.onReady). Then your problems will be over.