Тема: html css jquery
Показать сообщение отдельно

  #2  
Старый 26.02.2010, 21:12
diGriz
Участник форума
Регистрация: 11.10.2006
Сообщений: 134
Провел на форуме:
3607644

Репутация: 235
По умолчанию

Добавь a:visited и a:link. Зачем при эвентах делать отдельную функцию, если можно все сделать в jQuery.
Код:
<script src="http://code.jquery.com/jquery-latest.js"></script>    
 <style type="text/css">
.striped a:visited, a:link{
background-color:#ffffff;
color:#00cc33;
}
</style>
  <script>
  $(document).ready(function(){
      $("th").mouseover(function(){
		$(this).toggleClass('striped');
		}).mouseout(function(){
      	$(this).toggleClass('striped');
    });
  });
  </script>
<title>Untitled Document</title>
</head>

<body>

<div class="TableOne">
<table>
<tr>
<th><a href="#">гостевая</a></th>
<th><a href="#">гостевая</a></th>
<th><a href="#">гостевая</a></th>
<th><a href="#">гостевая</a></th>

</tr>

</table>
</div>

Последний раз редактировалось diGriz; 26.02.2010 в 21:45..