I have this:
<div>
<div class="navigation>
<ul>
...
</ul>
</div>
</div>
<div class="main">
</div>
I want to take .navigation div out of the div it is in, and place it on its own before .main div so I can get this:
<div class="navigation>
<ul>
...
</ul>
</div>
<div class="main">
</div>
Help?
unwrap()is what you are looking forTry this and it should work:
$('.navigation').unwrap();Although, if you have access to the code that generates this
html, you are much better off creating it the right way in the first place