title: JQuery, $(this) not correct in fadeIn, fadeOut callback function?
body: <p>I would like to fadeOut() an image on the page and remove it from the DOM after the animation is finished. Sounds easy enough?</p>
  
  <p>Example code (image has the id "img1"):</p>
  
  <pre>
     $("#img1").fadeOut("slow", function() { $(this).remove() });
  </pre>
  
  <p>This does does not work. When I inspect the page with Firebug the image is still there. It is just hidden.</p>
  
  <p>Second example which should kind of flash the image:</p>
  
  <pre>
     $("#img1").fadeOut("slow", function() { $(this).fadeIn() });
  </pre>
  
  <p>Strange.</p>
  
  <hr>
  
  <p>Thanks for the example pages which work great and as expected.</p>
  
  <p>The problem must be something else and only occurs in my project environment.</p>
  
  <p>Side note: when I do a simple console.log($(this)) in my callback function the result is the window object itself?!</p>
  
  <p>When I find out what side effects create the problem I'll update this question.</p>