Link to home
Start Free TrialLog in
Avatar of tankergoblin
tankergoblin

asked on

how to link to another page using hover

i have a row with 5 column.
i want my first column able to link to other page
i want to use hover so that whenever i point to first column an underline occur and the row change to another color.

Avatar of darenceang
darenceang

Not sure if this could help...

<body onMouseOver="location.href='http://www.yahoo.com/';"
bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000">

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of BrianMM
BrianMM
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just remove the onlick, if you want the specific link aspect...
Think this is what you are after.
<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td style="cursor:pointer; width: 200px;" onclick="javascript:location='yourpage.htm'" onmouseover="style.backgroundColor='#eee'; style.textDecoration='underline'; cursor: pointer; cursor: hand;" onmouseout="style.backgroundColor=''; style.textDecoration='none';">row 1 col 1</td> <td>row 1 col 2</td> <td>row 1 col 3</td> <td>row 1 col 4</td> <td>row 1 col 5</td>
  </tr>
</table>

Open in new window

That will only change the colour of the 1st cell, question states row to change colour.
Avatar of tankergoblin

ASKER

BrianMM:
Your idea looks good but i think is not efficient to declare cursor pointer in every row .
you know any jquery that can do this?
BrianMM:
Your idea looks good but i think is not efficient to declare cursor pointer in every row .
you know any jquery that can do this?
you can assign using a css class. My code was purley a rough guide to show the mechanism.
Have been doing this for years... if you can explain & prove this it would be interesting.