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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:48:01+00:00 2026-06-08T05:48:01+00:00

I have a table, the table row should be clickable ‘except’ for the last

  • 0

I have a table, the table row should be clickable ‘except’ for the last td in that row. So when clicked it opens a new window to a new URL.

However in that same table row, the last td needs to be clickable also to expand the table row for more details. At the moment I have this working but rather than having the one td clickable the whole row is (which I don’t want).

The code for the expand table row is: –

$("#report tr:odd").addClass("odd");
        $("#report tr:not(.odd)").hide();
        $("#report tr:first-child").show();

        $("#report tr.odd").click(function(){
            $(this).next("tr").toggle();
            $(this).find(".arrow").toggleClass("up");

        });

So overall I need the row clickable expect for the last td.

The last td I want to be able to expand the table row by clicking on that td NOT the whole row?

Any help would be great – I know what I need I just don’t know how to write it.

  • 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-08T05:48:04+00:00Added an answer on June 8, 2026 at 5:48 am

    Instead of applying the click event to the entire tr, you could apply it to the relevant cells instead like so:

    $("#report tr.odd td:not(:last-child)")
    

    That would select every td in the row except for the last one in the row.

    To then access the next tr, you’ll need to change that selector too:

    $(this).parent().next("tr").toggle();
    

    This will get the parent of the td you’ve clicked on (a tr) then find the next one. If the .arrow class is applied to a tr, the same needs to happen there:

    $(this).parent().find(".arrow").toggleClass("up");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table row, and within that, I have a td (whatever it
I have a table row that needs to be hidden when the anchor with
I have a table row that has the error message in it. <tr runat=server
I have a table where every row has a unique id. The last table
I have a html-table, that has a header, that is supposed to be clickable
I'm using SQL Server 2005. I have a table whose row size should be
I have a table row that has background color on hover. When user clicks
I have a table with 5 columns. The final row should have two cells,
I have the following HTML <table id=tbl1> <!-- Table row trHeader should be here
I have a table row with 4 columns on my ecommerce site and I

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.