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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:59:00+00:00 2026-06-19T01:59:00+00:00

I am working on a dynamic form, the rows are having parent dropdowns, and

  • 0

I am working on a dynamic form, the rows are having parent dropdowns, and when we select a parent it adds new ROWs for number of childs, I have given classes to each child rows. There is option of dynamically adding a parent row, and so on.

So far adding and deleting the parent rows are working fine. I am having trouble removing the last child row

below is a rough idea of how the rows are created, the

  Row 1: <parent> select
  Row 2: -<child> select
  Row 3: -<child> select
  Row 4: - Child Add row / Remove row
  Row 5: <parent> select
  Row 6: -<child> select
  Row 7: - Child Add row / Remove row
  Row 8: Parent Add row / remove row

for better idea here is the screenshot

enter image description here

This table is simple, no nested tables, only 6 columns and 12 rows, the indenting is done via css

Now if I use $('tr.partnumber_2_sub'); in console of firebug, i can see result like

Object[tr.partnumber_2_sub, tr.partnumber_2_sub, tr.partnumber_2_sub]

but when i use $('tr.partnumber_2_sub:last-child'); it output empty object. I want to remove the last child and my guess was to $('tr.partnumber_2_sub:last-child').remove(); but it is not working.

EDIT

Thanks for the answers for the last row, but i realized that my child add row / del row are also having same class on tr. Now i have to remove 2nd last element

EDIT

Okay, i have added extra class on tr of child row, and didnt added it add / del of child so now I can use them separately. changed back the title and accepted the answer.

Than you all

  • 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-19T01:59:02+00:00Added an answer on June 19, 2026 at 1:59 am

    try

    $('tr.partnumber_2_sub').last().remove()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with dynamic number of rows. $(#tbl).append(<tr><td name=Date+i+ id=Date_+i+>+com_date+</td><td id=day_+ i+>+theday
I have a form generating dynamic cookie, say: webform-62[1234356] 62[1234356] can be any number.
I have this form section with dynamic clone of select drop down menus. The
I am working on dynamic form. i have a radio button, if a user
So I'm working on making a dynamic drop down select form and I need
I'm working with a dynamic DOM here, and have called the jQuery UI datepicker
I am working on a dynamic bingo game that randomly generates the number in
I have been working on a dynamic page http://www.euroworker.no/order and I want my lovely
I'm having issues with dynamic form with wysiwyg editor. I'm using FCKEditor (I'm forced
I am working on rendering a dynamic form in an ASP.NET MVC view that

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.