$('#' + obj.id).parent().find('.section-secondary').length;

Yes...that is what basically ended up going the trick. I needed to be
a bit more specific. What I realized was that I didn't need the
entired of the particular ul group because each subgroup indicates the
'section-secondary'. Confusing...now it works perfectly.

Above, I'm just checking to see if the result (length) is more than
zero...

Many thanks!


On Jul 8, 3:16 pm, BaBna <thomas.na...@gmail.com> wrote:
> What about $('li.active').parents("ul").find(".whatever")?
>
> On Jul 8, 2:10 pm, vaaaska <vask...@gmail.com> wrote:
>
>
>
> > Haha...nice title? ;)
>
> > I have this list structure and when the page loads I reveal the active
> > page...all the other pieces are revealed when you click. Everything
> > works great except this one detail.
>
> > I need to run a check (a filter?) to see if the active list element
> > exists in a 'secondary' list (nested ul). If it does, I need to
> > activate another piece of code to display the secondary list titles
> > (and this is working as well). Just need to run a check so I know when
> > to run this extra code.
>
> > I can get the parent of the active list element and even the html
> > within it no problem...but I actually need to go up an additional
> > parent or two (ul's) so I can get the code for the entire section and
> > then filter to see if it is in fact it has the secondary pieces. This
> > is the list...
>
> > <ul id='section-id-16' class='section-menu'>
> > <li class='section-title section-primary'><span class='blank-title'
> > id='t2'>// Editorial</span>
>
> > <ul>
> > <li class='section-title section-tag section-secondary'><span
> > class='blank-tag'>Secondary List Title</span>
> > <ul>
> > <li class='section-page active'><a href='/newby-layout/'>Newby Layout</
> > a></li>
> > <li class='section-page'><a href='/notes/'>Notes</a></li>
> > <li class='section-page'><a href='/qs-for-dan/'>Q's for Dan</a></li>
> > <li class='section-page'><a href='/project/print/testing-
> > formats/'>Testing Formats</a></li>
> > </ul>
> > </li>
> > </ul>
>
> > <ul>
> > <li class='section-title section-tag section-secondary'><span
> > class='blank-tag' id='Herewerare'>Herewerare</span>
> > <ul>
> > <li class='section-page'><a href='/newest-year/'
> > class='herewerare'>Newest Year</a></li>
> > </ul>
> > </li>
> > </ul>
>
> > Etc...
>
> > I've tried $('li.active').parent() and $('li.active').parents() (and
> > tons of variations) but I just can not get the html beyond the first
> > parent. I'm not showing the full index here...it's quite long...but it
> > does validate and check out just fine.
>
> > Any ideas?
>
> > Thanks

Reply via email to