hide/show div on image click with jquery?
<p>I am trying to show/hide div when click on an image. when I click on the image nothing happens. What is wrong with my code</p>

<pre><code>&lt;script type="text/javascript"&gt;
$('#close').click(function(){
    $('#main').show();
    $('#login').hide();
    });
&lt;/script&gt;

&lt;div style="float:right;"&gt;&lt;a href="#"&gt;Close &lt;img id="close" src="assets/close.png"&gt;&lt;/a&gt;&lt;/div&gt;
</code></pre>
