How to delete DOM element based on attribute value
<p>I have this HTML code from Sharepoint and I was wondering if it's possible to delete this specific DOM element based only on the "text" attribute?</p>

<pre><code>&lt;ie:menuitem menugroupid="200" text="new docs view" onmenuclick="window.location = '/some link/';" type="option" id="zz36_View1"&gt;&lt;/ie:menuitem&gt;
</code></pre>

<p>Using Firebug I can simply right click the above line and click delete element. How do I do this using Javascript w/ Jquery?</p>

<p>Here's some context of where the above line came from:</p>

<pre><code>&lt;span style="display:none"&gt;
    &lt;menu compactmode="true" id="zz34_ViewSelectorMenu" type="ServerMenu"&gt;
        &lt;ie:menuitem menugroupid="100" text="All Documents" onmenuclick="window.location = '/some link/';" type="option" id="zz35_DefaultView"&gt;&lt;/ie:menuitem&gt;
        &lt;ie:menuitem menugroupid="200" text="new docs view" onmenuclick="window.location = '/some link/';" type="option" id="zz36_View1"&gt;&lt;/ie:menuitem&gt;
        &lt;ie:menuitem menugroupid="300" text="Explorer View" onmenuclick="window.location = '/some link/';" type="option" id="zz37_View2"&gt;&lt;/ie:menuitem&gt;
    &lt;/menu&gt;
&lt;/span&gt;
</code></pre>

<p>I tried something like:</p>

<pre><code>&lt;script language="Javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"&gt;&lt;/script&gt;

&lt;script language="Javascript"&gt;
    $(document).ready(function() {
        $('ie:menuitem[text*="new docs view"]').remove();
    });
&lt;/script&gt;
</code></pre>

<p>but it doesn't really work.</p>
