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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:53:22+00:00 2026-05-16T17:53:22+00:00

I have the following jQuery code to highlight table cells. Here is my html:

  • 0

I have the following jQuery code to highlight table cells.

Here is my html:

<table>
   <tr>
        <td class="day">
             <span class='hiddenImage'><img src='/images/test.png' /></span>
        </td>
        <td class="day"><span class='hiddenImage'><img src='/images/test.png' /></span>
        </td>
   </tr>
</table>

here is my jquery code

$("td").hover(
    function () {
          [show image]
    },
    function () {
          [hide image]
    }
);

Inside the table cell, i have a hidden <span> with class name hiddenImage. How do I display the image when i am hovering over that td cell?

Something like this inside the functions (but the below doesn’t seem to work)

 $(this '.hiddenImage').show();
  • 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-16T17:53:23+00:00Added an answer on May 16, 2026 at 5:53 pm

    I would do it in CSS with a rule that piggbacks on the .hover class you’re already using, like this:

    td.hover .hiddenImage { display: inline-block; }
    

    Then your jQuery is simpler as well:

    $("td").hover(function() {
      $(this).toggleClass("hover");
    });
    

    Or, if you don’t care about IE6 then just do it completely in CSS (no script at all):

    td:hover { ...styling... }
    td:hover .hiddenImage { display: inline-block; }
    

    Or if you must in jQuery (though it’s overkill), use .find() to get an element within, like this:

    $("td").hover(function () {
      $(this).toggleClass("hover").find(".hiddenImage").toggle();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following jquery code to format a html table. $(.jtable td).each(function() {
I have the following HTML/jQuery code and am trying to highlight a row in
I have the following jquery code: $(document).ready(function() { $(body[class*=page-calendar-practices] #content-header h1#title).after(<div id='athletics_practice-schedule'><div id='inner-title'><a href='www.example.com'
I have the following HTML/jQuery code where my CheckAll process box works fine but
I have the following jQuery Code: $(#menu span).click(function() { var url = this.getAttribute(data-url); var
I have the following JavaScript/jQuery code that starts the listener that highlights the DOM
i have the following jQuery code. $(function() { $('.clickme').click(function() { $('.totalthing').slideToggle('slow','easeInOutQuart', function() { //
I have the following jquery code which doesn't work quite right when trying to
I have the following jQuery code: $(body.page-calendar-practices-2012-05 #content-header h1#title) which works fine. I can
I have the following jquery code: jQuery(function(){ jQuery(select#rooms).change(function(){ var options = ''; jQuery.getJSON(/admin/selection.php,{id: jQuery(this).val(),

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.