Remove div without class when contains custom element with jquery
<p>I'm trying to remove stray elements. Some have no <code>class</code> or <code>id</code> attributes whom specifically have a custom element also without an <code>id</code> or <code>class</code> attribute. However there are some cases where the custom element does have a class name.</p>

<p>The only P that should remain, have either text only or a Video element.</p>

<pre><code>$("p:contains("$("getimage")")").remove();
</code></pre>

<p>Is there a better way to get this to work?</p>

<p>EDIT</p>

<p>"getimage" is the custom tag.</p>

<pre><code>&lt;div class="ajaxPostText"&gt;
&lt;p&gt;&lt;getimage style="display:none;" height="360" width="640" src="http://localhost:8888/localTesting/wp-content/plugins/wp-o-matic/cache/687a91dca2_ku-xlarge.jpg" class="transform-ku-xlarge"&gt;&lt;/getimage&gt;&lt;/p&gt;
&lt;p&gt;Movies are too long. Even film masterpieces can shave off a few minutes here and there so we can get off our butts, away from laptops, out of theaters, eyeballs off the TV a little bit earlier. So. How short can a movie be for you to get the gist of it? Can it be done in nine single frames?&lt;/p&gt;
&lt;/div&gt;
</code></pre>
