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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:02:23+00:00 2026-06-10T20:02:23+00:00

Hi I want to remove a div in jQuery. This is my code but

  • 0

Hi I want to remove a div in jQuery. This is my code but I have test and doesn’t work, the div doesn’t remove. help me.

var img_old=$(".colCenter").find('#div_'+old_id);
img_old.delay(10).animate({top:1440},1500, function(){
img_old.remove();
});

This is the html

<div class="colCenter" id="two">
    <div id="randomdiv" style="display:none;"></div>
    <div class="content" id="div_index">
        <div class="img_background">
                        <img src="img/sfondi/index.jpg" alt="" class="old_img" id="img_index"/>
                    </div>
                    <div class="logo_home">
                        <a href="index.php"><img src="img/logo_grande.png" alt="Web & Design" title="Web & Design" /></a>
                    </div>
                </div>
</div>
  • 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-10T20:02:25+00:00Added an answer on June 10, 2026 at 8:02 pm

    http://jsfiddle.net/mblase75/FJchB/ — your code works fine for me.

    Perhaps the variable old_id isn’t set in your code? I had to set it to “index” to get anything to happen.

    As others have suggested, you also need to wrap your code in a $(document).ready{...} block so it only runs after the elements are loaded.

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

Sidebar

Related Questions

I have this code, and I want on click on div with favoriteButton class,
I need a bit of help again... I have this code: <div id=lyrics> <div
I want to add and remove div element using jquery and adding of div
i have write this block of code in jquery to create three element after
i have the following jQuery code: $(document).ready(function() { $('#showContent').click(function(e) { e.preventDefault(); $(body).append(<div id='lyricsOverlay'></div>); $(#lyricsOverlay).height($(document).height());
Looking at In jQuery, want to remove all HTML inside of a div ,
I was trying so many options, but no results. However, I have this code
I want to add row with remove button through javascript in html div formate.
I have a DIV which I want to be removed when I click a
I want to remove the braces so {test} becomes test. I tried {test}.gsub(/\{(.*)\}/,$1) while

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.