title: Removing a specific element from a class
body: <p>I have this code, it moves every element in the class "block" 10 pixels to the left. I want it to remove any of the elements which are left of 300 pixels. Why does <code>$(this).remove()</code> not work and what can I do to fix this? </p>
  
  <pre><code>    $(".block").animate({left:"-=10"},speed,"linear",function(){
  
          if(parseInt(this.style.left) &lt; 300)
          {
              $(this).remove();
              //something
          }else{
              //something
          }
      });
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>    &lt;div id="container"&gt;
         &lt;span class="block"&gt;&lt;/span&gt;
         &lt;span class="block"&gt;&lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Here's all of my code <a href="http://jsbin.com/ExET/1/" rel="nofollow">http://jsbin.com/ExET/1/</a></p>