ユーザーがカーソルを合わせたときにフィールドを強調表示するために、この手の込んだ小さな JavaScript を使用しています。onclick
リンクとして機能し、URL に移動する関数を追加する方法があれば教えてください。
<script>
$(function() {
$('tr').hover(function() {
$(this).css('background-color', '#eee');
$(this).contents('td').css({'border': '0px solid red', 'border-left': 'none', 'border-right': 'none'});
$(this).contents('td:first').css('border-left', '0px solid red');
$(this).contents('td:last').css('border-right', '0px solid red');
},
function() {
$(this).css('background-color', '#FFFFFF');
$(this).contents('td').css('border', 'none');
$('a#read_message.php').click(function(){ URL(); });
});
});
</script>