css:
table.menu {border-collapse:collapse;} table.menu td {border: 1px #4682B4 solid;background-color:#B0C4DE;opacity: 0.5;}
html:
<table class='menu' width='100px'> <tr><td><a href='#'>Link 1</a></td> <tr><td><a href='#'>Link 2</a></td> <tr><td><a href='#'>Link 3</a></td> <tr><td><a href='#'>Link 4</a></td> <tr><td><a href='#'>Link 5</a></td> <tr><td><a href='#'>Link 6</a></td> </table>
jquery:
$(document).ready( function () { var def = $("#menu td").css("opacity"); $("#menu td").hover( function () { $(this).stop().animate({opacity: '1'}, 200); }, function () { $(this).stop().animate({opacity: def}, 200); } ); } );
This code does not work. How to make a sample correctly (if td just works)? Also a question. How to make the same sample, only + sample by thead / tbody?
$("#menu > td")
- Specter