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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:58:42+00:00 2026-05-13T13:58:42+00:00

i have the following format : <div id=container1> <div id=post> blah blah blah </div>

  • 0

i have the following format :

<div id="container1">
<div id="post"> blah blah blah </div>
<div id="post"> blah blah blah </div>
<div id="post"> blah blah blah </div>
</div>

<div id="container2">
<div id="post"> blah blah blah </div>
<div id="post"> blah blah blah </div>
<div id="post"> blah blah blah </div>
</div>

I want a jQuery code to remove the last “post” DIV in the “container1” with a fading effect.

Important : the “container1” does not have a specified “post” DIVs number. so the code should just select the last “POST” div in the “container1” div.

Thanks

  • 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-13T13:58:43+00:00Added an answer on May 13, 2026 at 1:58 pm

    $('#container1 #post:last').fadeOut() would remove the last div with the ID “post” in “container1”.

    Also, like Gumbo said, IDs should be unique. However, this jQuery code will still work.

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

Sidebar

Related Questions

I have the following HTML code based on a tab menu format, i.e: <div
I want to match dates that have the following format: 2010-08-27, 2010/08/27 Right now
I have the following xml format that i want to bind it through a
I have XML in the following format which I want to reformat: <blocks> <!--
I have soccer results data in the following format (thousands of observations): Div date
I have the following code to generate some spans using cakephp's helper <div id=numberRow>
I have the following code snippet: <div id=bookmarks style=height:150px;width:250px; padding-left: 100px;margin-top: -54px;font:16px/26px Georgia, Garamond,
I have the following working form: <div id=player_won> <form action=insert.php method=post> Firstname: <input type=text
I have divs in the following format <div class=box> <div class=button>B</div> </div> <div class=box>
I have a div in the following format. 1. How Can I add this

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.