JS event removed after variant selection

Hi,

I have created my own script with some functions in it. It is included in my Theme.php file and it’s working fine as long as you don’t select any other variant. When a different variant is selected the pages reloads using ajax and is in this point where the event it’s not assigned to my button again, I understand this is because my script it’s not being executed again. Same happens with a plugin, the JS is loaded the first time but once the page is „refreshed“ stop working

Any ideas?

Have a look at this event: shopware/jquery.ajax-variant.js at 5.4 · shopware/shopware · GitHub

Kind regards

That’s exactly what I needed. Thanks :smiley: