title: jquery .remove performance
body: <p>I am trying to remove the li's with conditon under Ul in multiple div's.</p>
  
  <pre><code>&lt;div&gt;
      &lt;ul&gt;
          &lt;li class="sel"&gt;.....&lt;/li&gt;
          &lt;li class="sel"&gt;.....&lt;/li&gt;
           ............
          &lt;li&gt;.....&lt;/li&gt;
          &lt;li&gt;.....&lt;/li&gt;
           ...........
           &lt;!-- I have some 600 li's --&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have 200 li's with <code>class='sel'</code>. Now I need to remove the remaining 400 li's.</p>
  
  <p>I am trying to remove in two ways, like,</p>
  
  <pre><code>$("ul", this).each(function(){
      $("li", this).each(function(){
          $(this).remove();
          //Also tried with -- $(this).empty().remove();
      });
  });
  </code></pre>
  
  <p>other way like,</p>
  
  <pre><code>$("ul", this).each(function(){
      $("li[class!=sel]", this).remove(); // Also tried with 'not'
  });
  </code></pre>
  
  <p>Now the problem is, When I am trying to execute these ways In IE getting Script overloaded error.</p>
  
  <p>Please help me out on other ways to remove unwanted li's.</p>
  
  <p>Note: I don't want to keep the un-wanted li's to hide() state.</p>
  
  <p>Thanks in advance...</p>