 <p>You might want to try:</p> <pre><code>$(document).ready(function(){ $(".shareLink").hide(); $("a.trigger").click(function(e){ e.preventDefault(); $(this).next().toggle("400"); }); }); </code></pre> <p>The answer is it depends on the structure of your document. Here is a sample of something that will work with the above function.</p> <pre><code>&lt;a class="trigger"&gt;click here&lt;/a&gt; &lt;div class="shareLink"&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. &lt;/div&gt; </code></pre>