Is there a jQuery version of this function?

> 
> string **strip\_tags**( string $str [,
>  string $allowable\_tags ] )
> 
> 
> 

strip all tags and content inside them from a string except the ones defined in the allowable tags string.

like:

```
var stripped = strip_tags($('#text').html(), '<p><em><i><b><strong><code>');

```

from:

```
<div id="text">
  <p> paragraph </p>
  <div> should be stripped </div>
</div>

```