I have the following html...
<body>
<section>
<div class="clip">
<header>first section header</header>
<aside>first section aside</aside>
</div>
<article>
<div class="content">
</div>
</article>
<article>
<div class="content">
</div>
</article>
</section>
<section>
<div class="clip">
<header>second section header</header>
<aside>second section aside</aside>
</div>
<article>
<div class="content">
</div>
</article>
<article>
<div class="content">
</div>
</article>
</section>
</body>
Using jQuery I want to append all the .content divs with the contents of their descendant sections .clip div.
forming this...
<body>
<section>
<div class="clip">
<header>first section header</header>
<aside>first section aside</aside>
</div>
<article>
<div class="content">
<header>first section header</header>
<aside>first section aside</aside>
</div>
</article>
<article>
<div class="content">
<header>first section header</header>
<aside>first section aside</aside>
</div>
</article>
</section>
<section>
<div class="clip">
<header>second section header</header>
<aside>second section aside</aside>
</div>
<article>
<div class="content">
<header>second section header</header>
<aside>second section aside</aside>
</div>
</article>
<article>
<div class="content">
<header>second section header</header>
<aside>second section aside</aside>
</div>
</article>
</section>
</body>
currently I have this for the jquery
$(document).ready(function () {
$(".content").prepend($(".content").parentsUntil("section").siblings("div").html());
});
which only selects the documents first .clip divs contents. How do I form the selector/jquery line to use the proper .clip divs for each .content div?