Jquery changing images on on click
<p>i have a problem with my click changing image, i have database messages , every message has a status 0 or 1 , from my code o have to click on status image and it will change, its changes BUT only for the first Message. When i click to other message status it not changes but changes only for the first status. how can i go this run!!!</p>

<pre><code>&lt;script type="text/javascript"&gt;
 $(function() {
$('.imageCheck').click(function(e){
 e.preventDefault();
$("#bg").attr('src',"/application/admin/img/tick.png");  
});    
});

    &lt;/script&gt;    
</code></pre>

<p>
                
                    </p>

<pre><code>                                            &lt;th&gt;Status&lt;/th&gt;

                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
                &lt;?php 
                foreach ($users as $user):

                ?&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;?=$user['id']?&gt;&lt;/td&gt;
                    &lt;td&gt;                                                      
  &lt;div class="imageCheck"&gt;&lt;img id="bg" src="&lt;?php echo $img_path;?&gt;publish_x.png" name="statusCheck" value="0" /&gt;
                                                   &lt;/div&gt;                                                     
                                            &lt;/td&gt; 
</code></pre>
