using jquery accordion uncanny markup
i have html structure wish modify an accordion.
<div class="accor">
<div class="section">
<h3>sub section</h3>
<p>sub domain text</p>
</div>
<div class="section">
<h3>sub section</h3>
<p>sub domain text</p>
</div>
<div class="section">
<h3>sub section</h3>
<p>sub domain text</p>
</div>
</div>
basically controlling h3s accordion headers, rest calm any div.section calm any accordion panel. (also note: headings anything between h2 h6, depending nesting).
i figured easiest dom tree restructured h3s outmost any div given that's accordion works default:
<h3>sub section</h3>
<div class="section">
<p>sub domain text</p>
</div>
the wholly problem is: pierce headings around? (i don't have opening change html).
var $sections = $("div.accor > .section"),
$headings = $sections.find("> :header")
;
// i figured inserting any streamer before the progenitor might
// answer:
$headings.insertbefore($headings.find(":parent"));
// ... nonetheless doesn't anything
Comments
Post a Comment