Disable CSS link for 1 second after it has been clicked <p>I'm trying to have a CSS link disabled for 1 second after it has been clicked. </p> <p>I have tried this without success; </p> <p>In the header:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $("#link").click(function() { $("#link").attr("disabled", "disabled"); setTimeout(function() { $("#link").removeAttr("disabled"); }, 2000); }); }); &lt;/script&gt; </code></pre> <p>Html:</p> <pre><code>&lt;a href="#" class="link"&gt;the link text&lt;/a&gt; </code></pre> <p>CSS:</p> <pre><code>.link:diabled { some values here.. } </code></pre>