How can I fix an auto-opening footer link on mobile?

Topic summary

A footer link was automatically opening on mobile devices instead of remaining closed until clicked. The issue was caused by JavaScript code in the theme’s custom.js file that triggered an automatic click event on page load.

Solution provided:

  • Navigate to Online Store > Theme files > custom.js
  • Remove or comment out the code containing window.onload function that auto-clicks the second footer block item button

Outcome:
The solution successfully resolved the issue. All footer links now remain closed by default and only open when users click them, restoring the expected mobile behavior.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hello,

I have an issue with my website.

https://tudoconexao.com

In the footer links, one of them opens automatically on the mobile, I wanted them all to be closed and only open if the person clicks. How can I solve this?

@Dawenn welcome to the shopify Community,

Yes this can be solved if you have coding idea then you have to follow below steps

Online Store > theme files > custom.js and remove or comment below code

/* (window.onload = function () {
        $(".footer__block-item.footer__block-item--links:nth-child(2) button").click();
    }), */

same like i did. If you have any issue do let me know i can do it for you :slightly_smiling_face:

thanks

1 Like

Worked perfectly! Thank you, you saved me :grin:

1 Like

@Dawenn

Need any help you ping me :slightly_smiling_face:

thanks

1 Like