Having issue with accumulative event listeners for frame navigation.
Hey guys! I'm new and I'm having issues with my frame navigation.
My issue is that after a few times going back and forth using the navigation buttons I have created the behavior of the buttons start to become slow. The more I do it the longer it takes.
I read here that event listeners are accumulative and that I should remove the event listeners. I have tried this but when I remove the event listeners my buttons stop working.
This is the original code accumulating the events listeners.
My question is, where should I put the removeEventListeners? I have to use these buttons all over the project and it is not necessarally sequential navigation.
I really appreciate your help guys.
