Posted By

raz on 11/02/10


Tagged

menu class hover add Parent


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


jQuery menu - keep parents highlighted - css menu


 / Published in: jQuery
 

URL: http://forums.asp.net/t/1456335.aspx

  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. $("ul > li > a").hover(function() {
  4. $(this).addClass("hover");
  5. $(this).parent().parent().parent().children("a").addClass("hover");
  6.  
  7. }, function() {
  8. $(this).removeClass("hover");
  9. $(this).parent().parent().parent().children("a").removeClass("hover");
  10. });
  11. });
  12. </script>

Report this snippet  

You need to login to post a comment.