How do you hide an image tag based on an ajax response?
<p>What is the correct jquery statement to replace the "//Needed magic" comments below so that the image tags are hidden or unhidden based on the AJAX responses?</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;JQuery&lt;/title&gt;
&lt;style type="text/css"&gt;
    .isSolvedImage{
        width: 68px;
        height: 47px;
        border: 1px solid red;
        cursor: pointer;
    }

&lt;/style&gt;
&lt;script src="_js/jquery-1.4.2.min.js" type="text/javascript"&gt; &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;div id='true1.txt' class='isSolvedImage'&gt;
    &lt;img src="_images/solved.png"&gt;
&lt;/div&gt;

&lt;div id='false1.txt' class='isSolvedImage'&gt;
    &lt;img src="_images/solved.png"&gt;
&lt;/div&gt;

&lt;div id='true2.txt' class='isSolvedImage'&gt;
    &lt;img src="_images/solved.png"&gt;
&lt;/div&gt;

&lt;div id='false2.txt' class='isSolvedImage'&gt;
    &lt;img src="_images/solved.png"&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;

$(function(){
    var getDivs = 0;

    //iterate div with class isSolvedImage
    $("div.isSolvedImage").each(function() {
        alert('div id--'+this.id);
        // send ajax requrest
        $.get(this.id, function(data) {
            // check if ajax response is 1
            alert('div id--'+this.url+'--ajax response--'+data);            
            if(data == 1){
                alert('div id--'+this.url+'--Unhiding image--');
                //Needed magic
                //Show image if data==1 
            }
            else{
                alert('div id--'+this.url+'--Hiding image--');
                //Needed magic
                //Hide image if data!=1
            }
        });

      });
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
