Good day everyone
I totally cannot figure out how to solve my problem.
To put it briefly: my JS function fires multiple times.
I put JS handlers directly into my templates
So, each time i open this page – js handlers applies again and when i click a button i recieve several messages in console.
I understand why this happens – frontend doesnt know when to dispose my JS functions and they stay alive.
What is the simplest way to solve this? Im totally dumb in modern JS frontend. I saw manual how to define components, but i dont need to define template of component. Only js handlers to intercept click on some elements with some classes.
In fact all i need is to create some click handlers (for special CSS classes) and correctly apply them only at specified pages (not across the whole application)
Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform