CodersSC
CodersSC

Reputation: 710

JQUERY Highlight on hover

I have two tables and they highlight as expected, but I only want the first table's rows to be highlighted, and not the second. How can I achieve this?

http://jsfiddle.net/EZj9T/5/

Upvotes: 0

Views: 237

Answers (3)

Telmo Marques
Telmo Marques

Reputation: 5106

EDIT

Looks like the first posted fiddle was incomplete.

Here you have the correct solution

Basically, you just need to give the table you want to highlight a class, like so:

<table border="1" class="hightlight">

And then in the CSS:

.hightlight tr:hover                
 { 
     font-weight: bolder; 
     color:black;
 }​

Upvotes: 0

Curtis
Curtis

Reputation: 103358

You don't need jQuery for this.

Add a class to your first table, and only apply styles to that class:

http://jsfiddle.net/EZj9T/12/

table.highlight tr:hover                
 { 
     font-weight: bolder; 
     color:black;
 }​

<table border="1" class="highlight">
  ....

Upvotes: 7

Qpirate
Qpirate

Reputation: 2078

i have changed your sample have a look and see if that is what you need.

it is here

Edit Link was incorrect i have put up the proper one

Upvotes: 0

Related Questions