用jQuery将3个div包装在一起
我需要使用jQuery将3个div包装成一个。
进入这个
我该怎么办?
非常感谢您的帮助
$('.one, .two, .three').wrapAll('');
要么
$('.one, .two, .three').wrapAll( $('').addClass('wrap') );
参考: http : //docs.jquery.com/Manipulation/wrapAll
我需要使用jQuery将3个div包装成一个。
进入这个
我该怎么办?
非常感谢您的帮助
$('.one, .two, .three').wrapAll('');
要么
$('.one, .two, .three').wrapAll( $('').addClass('wrap') );
参考: http : //docs.jquery.com/Manipulation/wrapAll