Posted By

pflangan on 05/29/11


Tagged

css menu jquery


Versions (?)

highlight current page link in navigation item css jquery


 / Published in: JavaScript
 

  1. var path = location.pathname.substring(1);
  2. if ( path )
  3. $('#menu a[href$="' + path + '"]').attr('class', 'selected');

Report this snippet  

You need to login to post a comment.