Wrap elements inside a div using jQuery

Check the .wrapAll() method:

$('.accordionTrigger p').wrapAll('<div class="moreInfo"></div>');

The wrapAll() method will wrap all the elements matched into another element (compared to the .wrap() method which wraps the matched elements individually)

DEMO

Leave a Comment