Wrap 3 divs in one with jQuery
jquery
Solution
$('.one, .two, .three').wrapAll('<div class="wrap">');
or
$('.one, .two, .three').wrapAll( $('<div>').addClass('wrap') );
Reference: http://docs.jquery.com/Manipulation/wrapAll
Problem
I need to wrap 3 divs into one using jQuery. ``` <div class="one"></div><div class="two"></div><div class="three"></div> ``` into this ``` <div class="wrap"><div class="one"></div><div class="two"></div><div class="three"></div></div> ``` How can I do that please? Many Thanks for your help in advance