title: jQuery selector from parent
body: <p>I have a <code>ul</code> element that has <code>li</code> items inside it. The <code>li</code> items do not have any attribute set that I can use as a direct selector (no class set, no id, and no way to set these). Based on the value of a link inside a particular <code>li</code>, I want to hide the element. So in the example below, I want to set the css of the <code>li</code> with the <code>href='link4'</code> to hidden.</p>
  
  <p>How would I write the selector to grab this element? I've tried many variations including `has([href='link4']), which I thought would work, but with no luck.</p>
  
  <p>Thanks for help.</p>
  
  <pre><code>&lt;ul id="mylist"&gt;
      &lt;li&gt;&lt;a href="link1"&gt;link1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="link2"&gt;link2&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="link3"&gt;link3&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="link4"&gt;link4&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;   
  </code></pre>