title: Ajax jquery success scope
body: <p>I have this ajax call to a <code>doop.php</code>. </p>
  
  <pre><code>    function doop(){
          var old = $(this).siblings('.old').html();
          var new = $(this).siblings('.new').val();
  
          $.ajax({
              url: 'doop.php',
              type: 'POST',
              data: 'before=' + old + '&amp;after=' + new,
              success: function(resp) {
                  if(resp == 1) {
                      $(this).siblings('.old').html(new);
                  }
              }
          });
  
          return false;
      }
  </code></pre>
  
  <p>My problem is that the <code>$(this).siblings('.old').html(new);</code> line isn't doing what it's supposed to do.</p>
  
  <p>thanks.. 
  all helpful comments/answers are voted up.</p>
  
  <p><strong>Update:</strong> it appears that half of the problem was the scope (thanks for the answers that helped me clarify that), but the other half is that I'm trying to use ajax in a synchronous manner. I've created a new post</p>