title: jquery parents/closest not working
body: <p>I have a link which posts some data to a controller. It is working fine and updates the data. But I want to change the css of the parent div but it is not happening. I have tried a lot of variations but I must be doing something stupid.</p>
  
  <p>The code is below</p>
  
  <p>View:</p>
  
  <pre><code>@foreach (var item in Model)
  {
      &lt;div class="added-property-excerpt"&gt;
          ...
          &lt;div class="added-property-links"&gt;
          ...
          @if (!item.IsPropertyDisabled) { 
                  @Html.ActionLink("Take off the Market" , "Disable", "Property", new { id = item.PropertyId }, new { id ="disable-link" })
              }
              else {
                  @Html.ActionLink("Bring on the Market" , "Enable", "Property", new { id = item.PropertyId }, new { id ="enable-link" })
              }
          &lt;/div&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>JQuery</p>
  
  <pre><code> &lt;script&gt;
       $(function () {
           $('a#disable-link').click(function (e) {
               $('.added-property-links').text('loading...');
               $.ajax({
                   url: this.href,
                   dataType: "text json",
                   type: "POST",
                   data: {},
                   success: function (data, textStatus) { }
               });
               $(this).closest('.added-property-excerpt').css("background", "red");
            // $(this).parent('.added-property-excerpt').css("background", "red");
               e.preventDefault();
           });
       });
   &lt;/script&gt;
  </code></pre>