2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by nblackburn
0

Use location.search to get the query from the url.

Like this:

$(function(){
     var path = location.pathname.substring(1);
     if ( location.search )
          path += location.search;
     if ( path )
          $('#nav ul#navigation li a[href$="' + path + '"]').attr('class', 'selected');
});

Hope it helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.