Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function($){
- // Add class .active to current link
- var cUrl = String(window.location).split('?')[0];
- if (cUrl.substr(cUrl.length - 1) == '#') {
- cUrl = cUrl.slice(0,-1);
- $.navigation.find('a').each(function(){
- if (cUrl.includes(this.href)) {
- $(this).parents('ul').add(this).each(function(){
- $(this).parent().addClass('open');
- });
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement