title: Jquery Ajax - response should replace html
body: <p>I'm beginning in Ajax and I have a couples of problems. I have a page with a list containning some video thumbnails, when you rollover on them, there's a "I dislike this" icon showing. That's done. Now where iam having problem is:</p>
  
  <p>When you click that icon, the video title, thumbnail &amp; info should disapear and another video must show.</p>
  
  <p>Here's my Ajax code</p>
  
  <pre><code>function ThumbsDown(id,sort,page) {
  $.ajax({
      url: "/change/videos/"+id+"/thumbsdown/",
      type: "POST",
      data: {
          "sort": sort?sort:"",
          "page": page?page:""
      },
      complete: function(result) {
           // Instead of calling the div name, I need to be able to target it with $(this) and .parent() to make sure only 1 video change, but for now I only want the response to replace the video
           $("#content .videoList ul li.videoBox").html(result);             
      }
  });
  }
  </code></pre>
  
  <p>The request is working, im gettin a (200 OK) response. And it's returning me the HTML code block for the new video.</p>
  
  <p>The problem is, <strong>when I click the icon, all the html in the div is gone</strong>. I have an empty tag, so I guess its interpreted as "empty". But in my firebug .Net tab, I can see clearly that there IS a response.</p>
  
  <p>Any help please?  <strong>ALREADY FIXED, THANKS</strong></p>
  
  <p><em>*</em>* EDIT **</p>
  
  <p>Now im having problems to target the specific div with$(this) and parents(). Can someone help?</p>
  
  <p>I want to target the li #videoBox</p>
  
  <pre><code>&lt;li class="videoBox recommended"&gt;
     &lt;div class="spacer" style="display: block;"&gt;&lt;/div&gt;
     &lt;div class="features"&gt;
        &lt;div&gt;
           &lt;a class="dislike_black" title="I dislike this" onclick="ThumbsDown(30835, 'relevance', '1');"&gt;&lt;/a&gt;
        &lt;/div&gt;
      ...
  </code></pre>
  
  <p>I tried this, and its not working.</p>
  
  <pre><code>    success: function(data) {
          $("#content .videoList ul li.videoBox").html(data); // this IS WORKING, but replacing ALL the thumbs
          $(this).parents("li.videoBox").html(data); // THIS IS NOT
  </code></pre>
  
  <p>What Im I doing wrong?</p>