title: Can I hide an Html link using javascript?
body: <p>It's a simple exercise in which I want to hide a link I put in my Html file.
  But make it appear after a timer has run out in my function.</p>
  
  <p>This is the javascript bit
  (below is the html bit)</p>
  
  <pre><code>var i = 10;
  var time;
  var countdown = document.getElementById("countdown");
  var link = document.getElementById("link");
  
  function MyFunction3() {
      document.getElementById("imageoef").style.visibility="visible";
      link.style.visibility="hidden";
  
      i--;
      countdown.innerHTML= i;
      time = setTimeout ("MyFunction3();",1000);
  
      if (i &lt; 1) {
          countdown.innerHTML="";
          document.getElementById("imageoef").style.visibility="hidden";
          link.style.visibility="visible";
      }
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;img src="images/loading.gif" alt="Loading..." id="imageoef" style="visibility:hidden" /&gt;
  &lt;form method="post"&gt;
      &lt;input onclick="MyFunction3();" type="button" value="start download" /&gt;
  &lt;/form&gt;
  
  &lt;div id="countdown"&gt;
      &lt;a id="link" href="http://freelanceswitch.com/freelance-freedom/freelance-freedom-2/" &gt;Your download is ready!&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>