I want the expression to verify that the link is in the correct data structure, i.e. inside a <dt> that is inside a <dl> and where $(this).parent().next() is a <dd>.
Said differently: I want to tell my script "if the link is inside a <dt> then show() the corresponding <dd> (if it exists)". That's why I was trying to use XPath and the parent::x syntax (and failed miserably, ha ha). > In the SVN build of jQuery you can do: > > $(this).parent().next().show(); > > jQuery SVN can be found here: > http://jquery.com/src/jquery-svn.js > > --John > > > I have the following structure: > > > > <dl> > > <dt><a href="url">x</a></dt> > > <dd>text</dd> > > </dl> > > > > > > I select the <a> element in this, and I want to show() the corresponding dd. > > > > > > This works but is not very precise: > > $("../../dt/../dd", this).show(); > > > > I'm trying to write it more precisely with something like: > > $("parent::dt/parent::dl/dd", this).show(); > > > > but I'm not finding the correct expression... _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/