Narrative - Listen events

Highlighted
New Member
1 0 0

Hi!

I am new in the shopify world and need some help.

i want to call some function when my product variant changes, looking on the Narrative theme code i found that there is a trigger is called with the event "variant_change" when the variant changes, and others, my question is:

- is possible to listen triggered events from the custom.js file if yes how? i want to be able to call functions when this kind of event happens, and if possible, i dont want to change the theme.js file, i would like to keep the custom code separeted.

the theme code seens realy good but my javascript knoledge is not enogth to understand all the bindings and stuffs.

Thankyou!

 

0 Likes