Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = window.location.pathname,
- urlRegExp = new RegExp(url.replace(/\/$/,"") + "$");
- $(".box-mnu a").each(function(){
- if(urlRegExp.test(this.href.replace(/\/$/,""))){
- $(this).addClass("active");
- }
- });
Add Comment
Please, Sign In to add comment