Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function(){
- var current = location.pathname;
- $('#admin-nav li a').each(function(){
- var $this = $(this);
- // if the current path is like this link, make it active
- if($this.attr('href').indexOf(current) !== -1){
- $this.parent('li').addClass('active');
- }
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement