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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:13:09+00:00 2026-06-11T11:13:09+00:00

Hopefully this will make sense. I have a page where an user can create

  • 0

Hopefully this will make sense. I have a page where an user can create an div box. That user can create up to three div boxes. Attached to each box is a delete button that if pressed will turn that specific box display to none. When they reload the page the screen is empty again and they can create the div boxes again with no errors. Now let’s say the user creates three div boxes, then deletes all three of them with the delete button. The user now with an empty screen decides to create one more div box. He does so and now there are two two div boxes with the same id’s, since that same div box has already been created once and is now in display none.

Because there are two duplicated div boxes, it makes it difficult for jQuery events to fire when there are multiple id’s on the same page. My question is, what could I replace with display none when I press the delete button to completely rid the code of the deleted div box? The code below is an example of what I mean there are duplicate div boxes, it was grabbed from firebug. (I purposely took out the delete button from each div box in the code below to simplify the problem. All that is needed to know is that it’s duplicated between the old div box and the new one). This would need to be done with jQuery, Javascript, or PHP.

//this section was colored in a lighter opacity in Firebug

<div id="post_3" class="ui-widget-content" style="position: absolute; left: 523px; top: 

341.1px; z-index: 990; display: none;"></div>

<div id="post_2" class="ui-widget-content" style="position: absolute; left: 254px; top: 

196.1px; z-index: 990; display: none;"></div>

<div id="post_1" class="ui-widget-content" style="position: absolute; left: 2px; top: 

343.1px; z-index: 990; display: none;"></div>

//end of section

//this is the most recent div box created. It clashes with the first div box.

<div id="post_3" class="ui-widget-content" style="position: absolute; left: 0px; top: 

343.1px; z-index: 990;"></div>

//end of most recent div box code
  • 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-11T11:13:10+00:00Added an answer on June 11, 2026 at 11:13 am

    Yes, the function .remove() will help you!

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

Sidebar

Related Questions

Hopefully this explanation will make sense, but what is the best way (if it
This will hopefully be a simple one: I have a div I want to
Hopefully this will actually make sense and sorry if its a stupid / obvious
Hopefully this makes sense. I have a php script, magpierss, that parses a RSS
New to MVC, so hopefully this will be pretty simple. I have an HTML
Hopefully this will be clear enough. I have a 2d map made of tiles,
I have just started looking at javascript so hopefully this will be something simple.
I am completely new to XML so hopefully my explanations will make sense.. I
I've simplified this example but hopefully the example provides enough substance to make sense.
Hopefully this will be a straightforward solution but I can't seem to solve it

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.