将现有的div作为子div附加到新的div吗? [英] Append existing div as child div to new div ?

查看:129
本文介绍了将现有的div作为子div附加到新的div吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,
我如何将现有的div作为子级添加到新的div.我正在使用下面的代码给定,但不能正常工作.


How I can i add existing div as child to new div. I am using this code give under the following but not working.

$cluetipInner.append('<div class="split-body">' + $('.left-content') + $('.right-content') + '</div>');



其中$(''.left-content'')和$(''.right-content'')是我要放入新div下的现有div.指南



where $(''.left-content'') and $(''.right-content'') are my existing div which I want to put under the new div. Guide

推荐答案

cluetipInner.append('< div class ="split-body">'+
cluetipInner.append('<div class="split-body">' +


(' .left-content')+
('.left-content') +


('.right-content')+'</div>');
('.right-content') + '</div>');



其中



where


这篇关于将现有的div作为子div附加到新的div吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆