jquery - Wrap divs from div parent -


i have code

<div class="superdiv">    <div></div>    <div></div>  </div>

i want wrap .superdiv children divs div called <div class="subdiv"></div>

how can make ?

thanks

you use .wrapinner() method:

$('.superdiv').wrapinner('<div class="subdiv"></div>'); 

you use .wrapall() method on children elements:

$('.superdiv').children().wrapall('<div class="subdiv"></div>'); 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -