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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:24:33+00:00 2026-05-23T19:24:33+00:00

What have to be changed to have the TD cells with class img also

  • 0

What have to be changed to have the TD cells with class “img” also highlighted, when the mouse goes over C,D,E & F (Pic 1 is highlighted) and K & L (Pic 3 is highlighted) – not only over the “first row” where the “rowspan” is defined (A,B,G,H & J)?

<table class="stripeMe" border="1">             
  <tr class="row1">                 
    <td rowspan="3" class="img">Pic 1</td>
    <td>- A -</td>
    <td>- B -</td>                 
  </tr>                  
  <tr>
    <td>- C -</td>
    <td>- D -</td>                 
  </tr>             
  <tr>
    <td>- E -</td>    
    <td>- F -</td>                 
  </tr>             
  <tr class="row1">                 
    <td rowspan="1" class="img">Pic 2</td>
    <td>- G -</td>    
    <td>- H -</td>                 
  </tr>          
  <tr class="row1">                 
    <td rowspan="2" class="img">Pic 3</td>       
    <td>- I -</td>    
    <td>- J -</td>                 
  </tr>                  
  <tr>      
    <td>- K -</td>    
    <td>- L -</td>                 
  </tr>             
</table>   

CSS

tr.over td {
  background-color: #f70;
}

jQuery

$(document).ready(function(){
     $(".stripeMe tr").mouseover(function() {
        $(this).addClass("over");}).mouseout(function(){
            $(this).removeClass("over");});
});

Code example to try: http://jsfiddle.net/9krDS/

  • 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-23T19:24:34+00:00Added an answer on May 23, 2026 at 7:24 pm

    Try this

    $(document).ready(function(){
      $(".stripeMe").delegate("td", "mouseover", function() {
         if($(this).closest("tr").hasClass("row1")){
            $(this).closest("tr").find(".img").addClass("over");
         } 
         else{
             var tr =  $(this).closest("tr");
             while(!tr.hasClass("row1")){
                tr =  tr.prev("tr");   
             }       
             tr.find(".img").addClass("over");                   
         }
    
     })
     .delegate("td", "mouseout", function(){
            $(this).closest(".stripeMe").find(".img").removeClass("over");
     });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table where i want to change cell background on mouse over
I have a class called SerialClient that sends/receives bytes over a serial port. When
I have a UITableView with static cells and I am trying to change the
i have a tableView with 3 cells. i want to change .detailTextLabel of that
I have changed the DefaultMode property of my details view to Insert since I
I have changed my locale to English/Great Britain (en-GB) as described here . When
I have changed a lot of things in a java code but now I
I have been puzzling over a problem this morning with LinqToSQL. I'll try and
I have a singleton class that I am using as part of a CAPTCHA
I have some JavaScript that creates a row in a table and adds cells

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.