 <p>you can use the jquery <code>toogle</code> api</p> <p>html</p> <pre><code>&lt;div id="clickhere "&gt; Click here &lt;/div&gt; &lt;img id="image" src="demo.png" alt="" width="120" height="120" /&gt; </code></pre> <p>jquery</p> <pre><code>$('#clickhere ').click(function() { $('#image').toggle('slow', function() { // Animation complete. }); }); </code></pre> <p>for further reference check this link of <a href="http://api.jquery.com/toggle/" rel="nofollow">jquery .toggle()</a></p>