next() finds the the unique next siblings for that element (in this
case their are none). You want the <a> that is the child of the
element's parent's next sibling, which takes longer to write in
English than in jQuery :)

 $('a.tab-menu-item-selected').parent().next().children();

nb this assumes the <a> is the only child, otherwise add a filter expr
in children

On Mar 4, 7:21 am, Joseph Le Brech <jlebr...@hotmail.com> wrote:
> you should be able to use the :after pseudo element
>
> http://www.w3.org/TR/CSS2/selector.html#before-and-after
>
>
>
> > Date: Wed, 4 Mar 2009 16:10:03 +0100
> > Subject: [jQuery] next() question
> > From: aplennev...@gmail.com
> > To: jquery-en@googlegroups.com
>
> > Hello,
>
> > say i have this markup:
>
> > <ul class="tab-nav-menu tab-menu">
> > <li><a class="tab-menu-item tab-menu-item-selected"
> > href="#fragment0">0</a></li>
> > <li><a class="tab-menu-item" href="#fragment1">1</a></li>
> > <li><a class="tab-menu-item" href="#fragment2">2</a></li>
> > <li><a class="tab-menu-item" href="#fragment3">3</a></li>
> > <li><a class="tab-menu-item" href="#fragment4">4</a></li>
> > < li><a class="tab-menu-item" href="#fragment5">5</a></li>
> > <li><a class="tab-menu-item" href="#fragment6">6</a></li>
> > <li id="imageLegend">Arca 180</li>
>
> > </ul>
>
> > I need to find the anchor link that immediately follows
> > a.tab-menu-item-selected. i tried using next but i never get it right
>
> > $('a.tab-menu-item-selected').next('a.tab-menu-item').length returns always > > 0
>
> > any idea how to find this selector would be greatly appreciated.
>
> > Thanks
>
> > Alexandre
>
> _________________________________________________________________
> Free photo editing software from Windows Live . Try it 
> now!http://clk.atdmt.com/UKM/go/134665240/direct/01/

Reply via email to