Javascript on click button not working

Topic summary

  • Main issue: A function intended to switch content when different buttons are clicked in a Shopify section is not working. The click interaction produces no change, and the event appears not to fire.

  • Observed behavior: In the browser, clicking the buttons does not update the content. The poster suspects the click handler is not being triggered.

  • Context: This occurs within a Shopify theme section, suggesting the code is embedded in a section template or script associated with that section.

  • Evidence: An attached image (screenshot) appears central, likely showing the code/UI setup related to the click handling.

  • Status: No resolution or confirmed cause is provided. Key unanswered questions include how the click listeners are attached, where the script is loaded relative to the DOM/section, and whether there are console errors or scope issues. The discussion remains open/ongoing.

Summarized with AI on January 25. AI used: gpt-5.

I am trying to include a function to my section to switch the content always that I click in a different button. I does not work. on browser when I click on the buttons it does not change. The event seems not happened