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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:19:13+00:00 2026-05-26T21:19:13+00:00

In the code provided below, you will see a map made of various tiles.

  • 0

In the code provided below, you will see a map made of various tiles. Clicking on a tile will “select” it.

What I want to happen:

  1. Click on a tile
  2. Press the “Place” button
  3. An oil derrick appears on that tile
  4. Press the “Remove” button
  5. The oil derrick goes away
  6. Click another tile
  7. Press the “Place” button
  8. A new oil derrick appears on that tile

The program works up until steps 7-8. For some reason, the oil derrick isn’t appearing again.

I have the Place and Remove buttons set up so that only one oil derrick may be on the map at a time. To remove an oil derrick, I do not expect the tile with the oil derrick on it to be selected before removal (hence, you can have a different tile selected and clicking Remove will still remove the oil derrick no matter what tile it is on).

What I think is the problem is that the oil derrick isn’t getting appended correctly the second time. This may be because of the way it’s being removed.

http://jsfiddle.net/briz/jdhPW/17/


On a side not,
I realize that there is a potential bug if the Place button gets pressed before a tile is selected.

  • 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-26T21:19:13+00:00Added an answer on May 26, 2026 at 9:19 pm

    There are many ways to fix this. I think the simplest would be to $(‘.oilDerrick’).hide() rather than remove(). An alternative would be to append clones and change class names, that requires changing a bit more code though.

    UPDATE: http://jsfiddle.net/jdhPW/19/

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

Sidebar

Related Questions

I'm using the code provided below to display time and date. can anyone help
I want to host StyleCop in a Custom Environment, the sample code provided in
By looking at the code I've provided below, does anyone know why the repeat
I am using the example from TheElements sample code provided with the iPhone SDK
Is anyone using the built-in code generation provided via text templates (using .tt files)?
I am not asking the static code analysis which is provided by StyleCop or
Don't be scared of the extensive code. The problem is general. I just provided
What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) {
I'm writing a select query in a C# method which lets client code provide
The code below is from SAMATE Reference Dataset . I used it to test

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.