Hi all,  I've got a bit of HTML with the following structure:

<div id="foo">
  <dl>
    <dt />
    <div id="bar">
      <dt />
      <dd />
      <dt />
      <dd id="baz"/>
    </div>
  </dl>
</div>

in IE6 and IE7 $("dd#baz").parents() returns an object with 2 nodes in
it, the dl and div#foo.  it does not contain div#bar.  I assume this
is due to a stricter interpretation of proper DOM structure in IE6 and
IE7 than in FF, Safari, Chrome, Opera, or even IE8 (where div#bar _is_
present).

I need to find div#bar.  Can someone suggest a traversal-based
workaround to getting there from dd#baz that will work in IE6 and
IE7?  The problem with non-traversal based solutions is that the
entire structure you see here may be nested inside each of the dd
elements, and if so, I'd need to find the div#bar _closest_ in the
parents hierarchy to the dd from which I begin.

If absolutely necessary, I can scrap dl structure and go with a more
pure div-based structure, but I'm trying to hook into some automatic
styling in my chosen framework and that is hung on dl elements.

Any suggestions?

Reply via email to