Post-image move before post-header on each single-post through jquery
I want if some body add div with class "post-image". It will automatically move it before div with class "post-header" and do this function on each div with class single-post.
- E.g. this is main //'post-image' after 'post-header'
<div class='single-post'>
<div class='post-header'>Title</div>
<div class='post-image'><img src='.../img1.png'/></div>
</div>
- <div class='single-post'>
<div class='post-header'>Title</div>
<div class='post-image'><img src='.../img2.png'/></div>
</div>
and i want this like this // 'post-image' before 'post-header'
- <div class='single-post'>
<div class='post-image'><img src='.../img1.png'/></div>
<div class='post-header'>Title</div>
</div>
- <div class='single-post'>
<div class='post-image'><img src='.../img2.png'/></div>
<div class='post-header'>Title</div>
</div>