On Mon, 6 Aug 2007 08:14:28 -0700, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> It would help if you put up a skeleton page somewhere to demonstrate the
> challenge.
> :)
Good point. Unfortunately, I can't do that right now, but here's a skeleton of
the issue:
<h2 id="h2a" class="h2">Heading 2a</h2>
<h3 id="h3a" class="h3">Heading 3a</h3>
<h3 id="h3b" class="h3">Heading 3b</h3>
<h2 id="h2b" class="h2">Heading 2b</h2>
In this case, I'd like to be able to do the following:
1] From #h2b, get the previous level 2 header (should return "#h2a"). Note,
this does not work: ('#h2b').prev('.h2')
2] From #h2b, get the previous level 3 header. (should return "#h3b").
3] From #h2b, get the first level 3 header from the previous level 2 header
(should return "#h3a").
Note, that this is a 'clean' sample. The real scenario has plenty of other DOM
objects between header levels.
~ ~ Dave