Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:51:47+00:00 2026-06-02T19:51:47+00:00

I´ve a parent div withs its child like this: <div id=padre class=demo> <ul id=sortable1

  • 0

I´ve a parent div withs its child like this:

<div id="padre" class="demo">
 <ul id="sortable1" class="droptrue ui-sortable">
  <li id="app1" class="ui-state-default toolTip">
   <div id="00" class="AppPadre"></div>

So when I clone my parent div with then next line:

var $copia = $('#padre>*').clone();

and I print my cloned variable it only shows:

<div id="padre" class="demo">
 <ul id="sortable1" class="droptrue ui-sortable">

Does anyone has any idea why is it only copying the 1st 2 levels??
Thanks in advance.
Just after the copy I´m removing all subelements of “padre” with $(‘#padre>*’).remove(); and it does remove all the subelements but when i do the append it only appends the 1st subelement of “padre”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:51:48+00:00Added an answer on June 2, 2026 at 7:51 pm

    You didn’t close the tags correctly:

    <div id="padre" class="demo">
    
         <ul id="sortable1" class="droptrue ui-sortable">
            <li id="app1" class="ui-state-default toolTip"><li>
         </ul>
    
        <div id="00" class="AppPadre"></div>
    
    </div>
    

    http://jsfiddle.net/E8uJm/


    edit: Try the following:

    $('#padre').children().clone();
    $("#clone").append($copia);
    $('#padre').remove();
    

    http://jsfiddle.net/E8uJm/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html: <div class=foo parent> <div class=child></div> </div> with some css: .foo{
I have this code: <div class=parent> <div class=child>something</div> </div> The parent should be 200px
I have a parent Div : <div id=ctl00_MainContentAreaPlaceHolder_deliveryOpen class=delivery_open style=display: block;> //Child select Element
I have two divs like so <div id=parent style=width:100px:overflow:hidden;> <div id=child> tooooooooooooooooooooo much content
i use a parent div with three child divs , <div id=parentDiv> <div id=PagerUp
$(this).parent().parent() .children(this.attr(tagName).toLowerCase()) .css(background-color, yellow); xpath: /html/body/div/table/tr/td/b/a $(this).tagName is Anchor <a> the problem with this
Here is my parent div, <div id=ResultsDiv class=resultsdiv> <br /> <span id=EmployeeName style=font-size:125%;font-weight:bolder;>Pandiyan</span> <span
Consider my parent div is parentDiv and it contains five child divs <div id=parentDiv>
I have a main parent div that is .resizable(). One of it's child divs,
How do I center a div horizontally inside its parent div with CSS ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.