title: jQuery (almost) equivalent of PHP's strip_tags()
body: <p>Is there a jQuery version of this function?</p>
  
  <blockquote>
    <p>string <strong>strip_tags</strong>( string $str [,
    string $allowable_tags ] )</p>
  </blockquote>
  
  <p>strip all tags and content inside them from a string except the ones defined in the allowable tags string.</p>
  
  <p>like:</p>
  
  <pre><code>var stripped = strip_tags($('#text').html(), '&lt;p&gt;&lt;em&gt;&lt;i&gt;&lt;b&gt;&lt;strong&gt;&lt;code&gt;');
  </code></pre>
  
  <p>from:</p>
  
  <pre><code>&lt;div id="text"&gt;
    &lt;p&gt; paragraph &lt;/p&gt;
    &lt;div&gt; should be stripped &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>