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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:42:41+00:00 2026-05-17T06:42:41+00:00

I have an HTML table where the first cell of each row contains text

  • 0

I have an HTML table where the first cell of each row contains text and the second cell contains a link. Like so:

<table id="foo">
  <tr>
    <td>Some text</td>
    <td><a href="/path/to/file/"><img src="/path/to/image.jpg" /></a></td>
  </tr>
  ...
</table>

I have a hover effect on the first table cell and when a user clicks on the first cell I wanted to trigger the link in the next cell so I chained a click function sort of like this:

$('#foo tr td:first-child').hover(...).click(
  function() {
    $(this).next().children().click();
  }
);

This doesn’t work. I’ve tried a few different ways with no success. I realise that I could put the text and link in the same cell and may end up doing that, but this is a simplified version of how my page actually is and it would take a bit of work to reshuffle things.

What am I doing wrong?

  • 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-17T06:42:42+00:00Added an answer on May 17, 2026 at 6:42 am

    Clicking a link programmatically won’t go to the href, only a native (user) click will, you can emulate it though, like this:

    $('#foo tr td:first-child').hover(...).click(
      function() {
        window.location.href = $(this).next().children('a').attr('href');
      }
    );
    

    This sets the window.location.href to go to the destination URL.

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

Sidebar

Related Questions

I have an HTML table of data where each cell can have multiple lines
I have a html table similar to this: <table> <tr> <td>1</td> <td>Some text...</td> </tr>
I have a HTML table. Each cell has content of different length. For this
I have an HTML table in which the first column's cells each contain a
I have an HTML table 2x2. In that table, I want the first row
I have an HTML table that looks like this: ------------------------------------------------- |Column 1 |Column 2
Let's say I have the following HTML: <table id=foo> <th class=sortasc>Header</th> </table> <table id=bar>
I have a html table that has 2 cells in a row. How can
I have an ordinary HTML table: <table> <tr> <td class=first-column-style>FAT</td> <td>...</td> </tr> <tr> <td
I have this html table where I have one cell in the table with

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.