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 3989728
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:24:33+00:00 2026-05-20T06:24:33+00:00

E.g: with only one container div : <div id=container1> <ul> <li>I am not part

  • 0

E.g:

with only one container div :

<div id="container1">
  <ul>
    <li>I am not part of update </>
    <li> ID fo container 1</li>
  </ul>
</div>

and when I adding new one div dynamic, I want them to be:

<div id="container1">
  <ul>
    <li>I am not part of update </>
    <li> ID of container 1</li>
    <li> ID of container 2 was added here </li>
  </ul>
</div>

<!-- container 2 should has both ID of container 1 and 2 -->
<div id="container2">
  <ul>
    <li>I am not part of update </>
    <li> ID of container 1</li>
    <li> ID of container 2 was added here </li>
  </ul>
</div>

It means when I create new container, the new created container ID should be adding to the previous containers.

And another problem is how to update the ID list of container when I remove container.E.g:

when I remove container1 , the ID list container should be updated to :

<div id="container2">
  <ul>
    <li>I am not part of update </>
    <!-- ID of container 1 had been remove -->
    <li> ID of container 2 was added here </li>
  </ul>
</div>

Thank you very much!!

  • 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-05-20T06:24:34+00:00Added an answer on May 20, 2026 at 6:24 am

    HTML structure you want is something like this:

      <div id="container-list">
        <div id="container1" class="container">
          <ul>
            <li>I am not part of update </>
            <li class="container1"> ID fo container 1</li>
            <li class="container2"> ID fo container 2</li>
          </ul>
        </div>
        ...
      </div>
    

    Adding a new container:

    var containerId = ... // your next id
    $('container-list').append(/* your new container html code */)
    
    // now appending a <li> to each of containers
    $('<li>').addClass(containerId).text(containerId).appendTo('div.container ul')
    

    Removing a container:

    var containerId = ... // container to remove
    $('#' + containerId).remove() // remove this container
    $('li.' + containerId).remove() // and remove any mention about it
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div container with list in it, only one item of this
Only one instance of a Script Manager can be added to the page. Such
Why only one overload throws this exception? Little update: I understand that there was
I thought there was only one - included in jQuery UI and documented here
I'd like to have one div at center of another div horizontally. <div id=container>
I need a very simple menu which probably contains only one or two items:
I am only one person working on project - so I am developer without
I found only one attempt to create such compiler - http://sourceforge.net/projects/xsltc/ . But this
I have only one class with many instances. Every instance is observer of couple
I had only one function to Add another row to the table id=tblOtherParties and

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.