Question: If I have some html like this.

```
<ul class="menu">
 <li>
  <a href="pageGreen">
   pageGreen
  </a>
 </li>
 <li>
  <a href="pageBlue">
   pageBlue
  </a>
 </li>
 <li>
  <a href="pageRed">
   pageRed
  </a>
 </li>
 <li>
  <a href="page1">
   page1
  </a>
 </li>
 <li>
  <a href="page2">
   page2
  </a>
 </li>
 <li>
  <a href="page3">
   page3
  </a>
 </li>
</ul>

```

How would I remove the entire LI element for pageGreen and pageBlue only, using jquery?

Answer: 
something like this could work

$("a[href='pageGreen']").parent().remove();
Try [jQuery’s `:contains()` selector](http://docs.jquery.com/Selectors/contains#text):

```
$("li:contains(pageGreen), li:contains(pageBlue)").remove();

```