Jump to content
Killersites Forums

highlight a row of a mother table that has an image in a nested table


Guest amoramor

Recommended Posts

Guest amoramor

Hello, I'm new at jquery and im interested to solve the following problem,

to explain myself better, here is an example html code:

 

 

 

 

 

 

 

 

hi

 

hello

 

 

hello

 

 

 

 

hi

 

 

hello

 

 

 

 

   

hello

 

 

 

hi

  

hello

 

 

 

-------------------------

the css is simple:

.yellow{background-color:#FF0}

.textred{color:#F00}

-------------------------

the jquery (as far as i got!):

$(function(){

$('a.textred').click(function(){;

$(this).parent().parent().toggleClass('yellow');

});

});

--------------------------

THE PROBLEM:

 

Whether i click on "hi" (the problem is the "hi") or "hello", i would like to highlight the whole row of the 'mother' table, regardless of its position in the embedded table

 

Thanks very much,

Amor

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...