Mark Jones
Mark Jones

Reputation: 89

jQuery show content on hover

Basically have a table of products, something similar to:

<table>
  <tr>
    <td>Product 1 <br> Brief info</td>
    <td>Product 2 <br> Brief info</td>
    <td>Product 3 <br> Brief info</td>
  </tr>
</table>

When a user hovers over a table cell I would like to slightly fade out the cell and then have some content overlay that cell with a call to action to the product page.

Not been too succesful with getting this to work so any pointers would be appreciated.

Upvotes: 1

Views: 1628

Answers (2)

xkeshav
xkeshav

Reputation: 54016

see DEMO

Upvotes: 2

Pranay Rana
Pranay Rana

Reputation: 176886

Make use of : .hover()

$("table td").hover(
 function () {
     // mouse over
  }, 
  function () {
   // mouse out
  }
);

Upvotes: 2

Related Questions