Show and hide upload text field depending on selected variant

12 0 4

I am working on a brooklyn theme. I have a custom field where customers can upload a text to customize their product. This custom field should only be display if they decide to add this option.

In my research I have found that this events are handle by a javascript code that update product pictures and price.

On the brooklyn theme where can I find this event? What steps should I follow to accomplish or where can I found info about?