How to make menu items active based on hash
This can be accomplised fairly easy by checking the URL then setting the appropriate link to active. That can be accomplished by the following… var hash = window.location.hash.substr(1); // Get the text after the hash $(‘a[href=”#’ + hash + ‘”]’).addClass(‘active’); // Set the correct link to active However, there are some things to consider. Someone … Read more