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

  • SEARCH
  • Home
  • 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 7940633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:26:34+00:00 2026-06-03T23:26:34+00:00

I have created a box using a div . <div class=panel style=display:inline; float:left;position: relative;

  • 0

I have created a box using a div.

<div class="panel" style="display:inline; float:left;position: relative; width: 140px; height: 200px; border:solid 2px; border-color: red;cursor: pointer;"></div>

I tried to use jQuery to clone the element and append the clone to itself, but it doesn’t work as expected.

for (; i < noC; i++) {
    $(".panel").clone().appendTo($(".panel"));
}

I want each box to be added after the last box.

[]     // noC = 1
[][]   // noC = 2
[][][] // noC = 3

Instead, each new box gets inserted inside of the previous box.

[]     // noC = 1
[[]]   // noC = 2
[[[]]] // noC = 3

How do I do that?

  • 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-03T23:26:35+00:00Added an answer on June 3, 2026 at 11:26 pm
    noC = 3;
    for(i= 0; i < noC;i++) {
        $("#panel").append(function(){     
            return $("#panel").find('div').length==0?$(this).clone(): $("#panel").find('div:first').clone();
        });
    }​
    

    for live demo see this link: http://jsfiddle.net/nanoquantumtech/PBBNe/
    //Or

         noC = 3;
        for(i= 0; i < noC;i++) {
        $("body").append($("#panel:first").clone());        
         }​
    

    for live demo see this link: http://jsfiddle.net/nanoquantumtech/HvnbU/

    • 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=box> <a href=#goals> | <a href=#rules> | <a href=#controls>
I have this html: <div class="object-box"> <img ... /> <span class="caption">This is the caption</span>
I have created app using jQuery Mobile and need to get a Dialog box
I have created a nice tooltip box using JQuery and I used some plugin
I have created an application which needs to have a profile box tab which
I have created a unbound listbox. I have the box showing a list of
I have a dialog box, created with the code javascript and HTML generated below.
Greetings all, I have a question. On my MOSS 2007 dev box, I created
I have an HTML page. I have created a frame using background repeat function.
I have a quick jQuery question: First, my HTML: <div id=taskinput> <form> <input id=taskinput-box

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.