[jQuery] Re: Issue with next()/prev() traversal

2008-01-31 Thread Wizzud
One way (assuming there is only one a.boldFont, and its position is unknown and may change): // store a list of all anchors in the target div... var anchors = $('#eventlist a'); // then when(ever) you need to... // ...find the position of the boldFont anchor within the stored list var bf =

[jQuery] Re: Issue with next()/prev() traversal

2008-01-31 Thread besh
Hi, try this: $('#eventlist a.boldFont').next('a').trigger('click'); $('#eventlist a.boldFont').prev('a').trigger('click'); -- Bohdan Ganicky On Jan 31, 4:26 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hallo, I am quite new to Jquery and so please forgive me if my problem sounds dumb

[jQuery] Re: Issue with next()/prev() traversal

2008-01-31 Thread besh
Oops! Mea culpa! next() and prev() gets only the very next/prev siblings. Next iteration (now tested ;)): $('#eventlist a.boldFont').nextAll('a:first').trigger('click'); $('#eventlist a.boldFont').prevAll('a:first').trigger('click'); -- Bohdan Ganicky On Jan 31, 7:42 pm, besh [EMAIL