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

The Archive Base Latest Questions

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

basically what I wanted to do is whenever an li is removed (via jquery

  • 0

basically what I wanted to do is whenever an li is removed (via jquery .remove()) the set of li’s slide to the space previously occupied the removed li. How can I accomplish this? Here is some code:

<li class="be-imagecontainer"> 
<span style="display:none">101</span> 
<img src="http://localhost/thi/media/images/thumbnails/19_Koala.jpg" class="be-image" alt="19_Koala.jpg" /> 
<br/> 
<a href="http://localhost/thi/ajax/deleteimg/101.html" class="be-delete">Delete</a> 
</li> 
<li class="be-imagecontainer"> 
<span style="display:none">111</span> 
<img src="http://localhost/thi/media/images/thumbnails/19_Penguins.jpg" class="be-image" alt="19_Penguins.jpg" /> 
<br/> 
<a href="http://localhost/thi/ajax/deleteimg/111.html" class="be-delete">Delete</a> 
</li> 
<li class="be-imagecontainer"> 
<span style="display:none">112</span> 
<img src="http://localhost/thi/media/images/thumbnails/19_Hydrangeas.jpg" class="be-image" alt="19_Hydrangeas.jpg" /> 
<br/> 
<a href="http://localhost/thi/ajax/deleteimg/112.html" class="be-delete">Delete</a> 
</li> 

and here is some javascript code

$('a.be-delete').click(function(){
 $(this).parent().remove();
 // code to slide the rest of the divs the unoccupied space
})

the default behavior is that the rest of the list will snap to that space. How do I do that with a slide instead?

for other examples, check google wave’s behavior when u close a panel. The other panel/s slide in to the previously occupied space

  • 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-13T05:26:22+00:00Added an answer on May 13, 2026 at 5:26 am

    You can use the slideUp effect, and when it finishes, you can remove the DOM element:

    $('a.be-delete').click(function(){ 
      $(this).parent().slideUp('slow',  function () { 
        $(this).remove(); // remove the li
      }); 
      return false; 
    })
    

    You can use $(this).closest('li') instead of parent() if your anchor is nested in some other element.

    Check an example with your markup here.

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

Sidebar

Related Questions

I wanted to have a URL like this www.mydomain.com/19127axbj1 and basically when this is
I am fairly new to jQuery and I wanted to ask a question. Basically
Basically I wanted to do something like git push mybranch to repo1, repo2, repo3
I wanted to add a new property to one of my model (table). Basically
I wanted to create a new property on a table in my model.. Basically
Basically what i want to say is can we decide among the list of
Basically I wanted to have an if-else statement in my linq to sql statement.
Can anyone shed any light on this? I feel like I have wasted the
I am new to jqwicket. Basically I wanted to know how to add animation
I basically wanted to detect when a user scrolls and removes his finger from

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.