jQuery menu - keep parents highlighted - css menu


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  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>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.