Hello,
I currently have the following html:
<h3 />
<p />
<p />
<ul />
<ol />
<h3 />
<p />
<p />
<ul />
<ol />
<h3 />
<p />
<p />
<ul />
<ol />
I'd like to create an accordion but for this I need the following:
<h3 />
<div>
<p />
<p />
<ul />
<ol />
</div>
<h3 />
<div>
<p />
<p />
<ul />
<ol />
</div>
I have tried the following, but it doesn't work:
$('.page2 .articleText p, .page2 .articleText ul').after('<div class="accordion">');
$('.page2 .articleText h4:not(:first)').before('</div>');
Any help is much appreciated.
Thanks!