JavaScript Event Issue on Shopify Store

Hi all,

I’m facing an issue with my Shopify store’s JavaScript. I’ve got this piece of code:


Despite the element existing, clicking it doesn’t trigger the expected function. Any thoughts?

For context, I run https://secondstartfinancial.com/ and am more familiar with backend processes.

Hi @KaylaDavis

The following script only run if the element with ID, myElement exist. You also need to place this code after all script has been read