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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:21:19+00:00 2026-06-02T03:21:19+00:00

I am having four column in my table. When we click one of the

  • 0

I am having four column in my table. When we click one of the first three td that will do one operation and when we click last td that will do other kind of operation.
I did like this

$('#items_list tr td').not('#items_list tr td:last-child').click(function() {
  // Do  something
}

$("#items_list tr td:last-child").click(function() {
  // Do something
}

But those not working when Dom change. I try to use .live(), but the disadvantage of li is
Chaining methods is not supported. Any one can guide me?

  • 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-02T03:21:21+00:00Added an answer on June 2, 2026 at 3:21 am

    There is no need to add events to every cell on the table. One event handler at the table tbody level can handle it.

    jQuery("#foo tbody").on("click", function (evt) {
       var elem = jQuery( evt.srcElement || evt.target );
        if (elem.is("td:last-child")) {
            alert("last child");
        } else {
            alert("not last child");
        }       
    });
    

    You might have to add code to the elem to look for the closest td if you have elements inside of the td.

    if (!elem.is("td")) {
        elem = elem.closest("td");
    }
    

    jsFiddle

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

Sidebar

Related Questions

i have one datagridview.in my datagridview is having four row and three columns.after enter
I have four entities that are involved in a query that I'm having a
My table is having four fields in which two fields are unique. They are
my problem is that while on a desktop I like having the menu first,
I have a PHP array that produces four columns per row of a table.
I was creating a sample wherein we will be having four blocks and when
I have four machines: XP with SQL 2000 (Machine A, the one I'm having
I want to update the values of one column in a table from '0'
Having just read the first four chapters of Refactoring: Improving the Design of Existing
What i have is four comboboxes and two files. If the column matches the

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.