Ticket #4469 (closed bug: fixed)
Accordion: newContent/oldContent misbehaving
|Reported by:||mikecapp||Owned by:|
|Keywords:||accordion newContent oldContent||Cc:|
In the handler for an accordionchange event, the ui object exposes oldHeader/newHeader and oldContent/newContent. Given the markup
<div id="accordion"> <div> <a href="#">First header</a> <div><p>This is a P wrapped in a DIV</p></div> </div> <div> <a href="#">Second header</a> <div><p>This is a P wrapped in a DIV</p></div> </div> </div>
the headers are what you'd expect - the <a> elements. The oldContent/newContent properties, on the other hand, return not the <div>s following the headers as you'd expect, but the <p> elements nested inside those divs. Without the nested <p>s, oldContent/newContent are empty.
This is surprising, annoying, inconsistent and not obviously useful.
- Status changed from new to closed
- Resolution set to fixed