SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function($){
  2.   // Add class .active to current link
  3.   var cUrl = String(window.location).split('?')[0];
  4.  
  5.   if (cUrl.substr(cUrl.length - 1) == '#') {
  6.     cUrl = cUrl.slice(0,-1);
  7.  
  8.     $.navigation.find('a').each(function(){
  9.       if (cUrl.includes(this.href)) {
  10.         $(this).parents('ul').add(this).each(function(){
  11.           $(this).parent().addClass('open');
  12.         });
  13.       }
  14.     });
  15.   }
  16. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top