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
Post a Comment