Streaming live at 10am (PST)

Trigger script on page load

Hey,

I’m putting an item behind a password protected page, and want to have a script that clicks the “Buy Now” button triggered on the page load.

The script:

    function buyNow() {
    document.getElementById('buy-now').click();
    }
    
</script>

What’s the best way to go about doing this?


Here is my site Read-Only: https://preview.webflow.com/preview/reconvene?utm_medium=preview_link&utm_source=designer&utm_content=reconvene&preview=7eb8f4a37295c403b824f2e08cdc001d&pageId=5f1e365998a45fd2b48c2b52&itemId=5f1e3e06d7dc80343eab49c0&mode=preview
(how to share your site Read-Only link)

<script>
function buyNow() {
  document.getElementById('buy-now').click();
}
(()=>buyNow())
</script>