Adrian, I recommend using .parent() for better performance... ---- Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Wed, Feb 4, 2009 at 4:22 PM, Adrian Lynch <adely...@googlemail.com> wrote: > > Hello all. I have the following... > > <div> > <input type="text" value="1" /> > </div> > <div> > <input type="text" value="2" /> > </div> > <div> > <input type="text" value="3" /> > </div> > > ... and I want to select the second div because its child input has a > value of 2. > > I know I could select the input then come back to the div with parents > ("div"). Just wondering if there's a way to do it in the selector > string. > > More out of curiosity than need ;) > > Thanks. > > Adrian