toggle two images on click
<p>I'm trying to use someone's code from an earlier post that I posted on here, and in it, he provided a <a href="http://jsfiddle.net/D9VvV/" rel="nofollow">jsFiddle</a> that shows how to toggle between two images.</p>

<p>I'm trying to replicate exactly what that person is doing, but it doesn't seem to work on my code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;

&lt;script src="jquery.js"&gt;&lt;/script&gt;

&lt;script&gt;

$('#ellomatey').toggle(
function(){
    $(this).attr('src', 'bgimage.png');
},
function(){
    $(this).attr('src', 'redsquare.png');
});​

&lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;
&lt;img id="ellomatey"  src="bgimage.png"  /&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Does anyone know what I'm doing wrong? I have a feeling that it's not calling the function correctly, but it seems to work on that person's example.</p>
