Waiting list

mail@pastecode.io avatar
unknown
javascript
3 years ago
769 B
1
Indexable
Never
<a href="" id="purchase-shares-btn" class="purchase-shares-btn"></a>
    <script>
        const horseSlug = 'dancing-on-the-edge';
        const buttonType = "waiting_list";
        //button types can be "purchase" to navigate to shop or "waiting_list" to navigate to horse page on website
 
        const anchor = document.getElementById('purchase-shares-btn');
 
        if(buttonType === 'purchase') {
            anchor.setAttribute('href',`https://shop.oldgoldracing.com/#/${horseSlug}`)
            anchor.innerHTML="PURCHASE SHARES"
        }
 
        if(buttonType === 'waiting_list') {
            anchor.setAttribute('href',`https://oldgoldracing.com/${horseSlug}/?waiting_list=true`)
            anchor.innerHTML="JOIN WAITING LIST";
        }
    </script>