selecting div that contains div with a certain value
<p>I have several outer divs, all of them contain 3 inner divs <code>class1</code> <code>class2</code> <code>class3</code>. I want to select the outer div based on the value attribute of its inner div that has <code>class1</code>. For example, I want to select the first div because its <code>class1</code> div has value <code>x</code>. How do I do this with jquery?</p>

<pre><code>&lt;div&gt; &lt;-----this is the div I want to select
  &lt;div class="class1" value="x"&gt;&lt;/div&gt;
  &lt;div class="class2" value="y"&gt;&lt;/div&gt;
  &lt;div class="class3" value="z"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div&gt; 
  &lt;div class="class1" value="a"&gt;&lt;/div&gt;
  &lt;div class="class2" value="b"&gt;&lt;/div&gt;
  &lt;div class="class3" value="c"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
