click on an image to load another image in jquery
<p>I have an image displaying using the jquery. When mouse over to that image, I like the mouse to change to be clickable and when clicked, I like to load another image. This is my code and not working. Any ideas?</p>

<p>html code:</p>

 

 

<p>jquery code:</p>

<pre><code>$("#div1").click(function () {
    var img_cpu = "http://192.168.101.1/cpu.png";
    var myImage = new Image();
    $(myImage).load(function () {
        $("#div2").html(myImage)    
    }).error(function () {
        $('#div2').hide();
    })
    .attr('src', img_cpu)
});
</code></pre>
