title: jQuery: Change an element value after Ajax Call
body: <p>I am trying to change the value of a span after using jQuery.ajax.</p>
  
  <h2>JavaScript</h2>
  
  <pre><code>$(document).on('click', '.kssico', function(event) {
      var for_uid = $(this).parents("li").attr('data'),
          for_name = $(this).parents("li").attr('unme'),
          dataString = "for_uid=" + for_uid + "&amp;for_name=" + for_name; 
  
      $.ajax({
          type: "POST",
          url: "include/ajax.php",
          data: dataString,
          success: function (html) {
              if(html=="300") {
                  $('#myModal .modal-body p').html("Error Please Try Again.");
                  $('#myModal').modal('show');
              }
              else {
                  $(this).parents("li span.mi-val").html(html);
                  $('#myModal .modal-body p').html("The Requested Action Has Been Notified To Your Friend.");
                  $('#myModal').modal('show');
              }
          }
      });
  });
  </code></pre>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;li class="mispan main-span" &gt;
      &lt;div class="thumbnail"&gt;
          &lt;h3 class="miheader"&gt;Dewashree Singh&lt;/h3&gt;
          &lt;a &gt;
              &lt;div class="miprofile-pic-cnt" &gt;&lt;/div&gt;
          &lt;/a&gt;
          &lt;div class="caption"&gt;
              &lt;p&gt;
                  &lt;a href="#" class="btn kssico miclickks"&gt;
                      &lt;img src="/lisps.png"&gt;&lt;span class="mi-val"&gt;0&lt;/span&gt;
                  &lt;/a&gt;
                  &lt;a href="#" class="btn bdico miclickbd"&gt;
                      &lt;img src="/besd.png"&gt;&lt;span class="mi-val"&gt;1&lt;/span&gt;
                  &lt;/a&gt;
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>When I click on <code>a.miclickks</code> it should complete the Ajax call and return a value too be placed inside the span on the button anchor. However, nothing is being changed!</p>
  
  <p><a href="http://jsfiddle.net/3SLrx/" rel="nofollow"><h2>jsFiddle</h2></a></p>