force visitors to first click on my social media handle link before activating a link or download

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vintoICT
User
Posts: 435

force visitors to first click on my social media handle link before activating a link or download

Post by vintoICT »

I want force visitors to first click on my social media handle link before activating a link to a page or download button.

if(condition)
     disableLink();
else
   showLink();



function disableLink()
        {

        document.getElementById('Link1').disabled=true;
        document.getElementById('Link1').removeAttribute('href');    
        document.getElementById('Link1').style.textDecoration = 'none';
        document.getElementById('Link1').style.cursor = 'default';
        }

        function showLink()
        {
            document.getElementById('Link1').disabled=false;
        //assign href dynamically
        document.getElementById('Link1').href = "somepage.html";
        document.getElementById("Link1").style.textDecoration = "underline";
        document.getElementById("Link1").style.cursor = "hand";
        }

but i want the link disabled only if the user's browser have not visited.


Post Reply