title: AJAX/Jquery to update only a particular div on clicking particular button
body: <p>I have the following AJAX function to update votes clicked.</p>
  
  <pre><code>$(function() {
              $(".vote").click(function()
              {
              var id = $(this).attr("id");
              var name = $(this).attr("name");
              var dataString = 'id='+ id ;
              var parent = $(this);
  
              if (name=='up')
              {
              $(this).fadeIn(200).html('&lt;img src="/content/voting/yes-enb.JPG" /&gt;');
              $.ajax({
              type: "POST",
              url: "up_vote.php",
              data: dataString,
              cache: false,
  
              success: function(html)
              {
              parent.html(html);
              }
              });
              }
  
  });
  </code></pre>
  
  <p>and the div/span html code is as below</p>
  
  <pre><code>&lt;span class="vote"  id="53" name="up" style="text-decoration:none; color:none; margin:5px; "&gt;
  &lt;img src="/content/voting/yes-enb.png" width=12 height=12 alt=""&gt; 
  &lt;span style="text-decoration:none; color:none"&gt;'.$up.' &lt;/span&gt;&lt;/span&gt;
  </code></pre>
  
  <p>So the above AJAX code increments the counter every time the user clicks the vote button. However in this case the vote img as well as the count of vote gets refreshed. All I want is that the  '.$up.'  part gets refreshed. that is only the vote section.</p>
  
  <p>Any idea how this could be done?</p>