Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //jQuery Auto-selected Sub Menu
- $(function() {
- $('a.nav').click(function() {
- $(this).siblings('.sub-menu').slideToggle();
- })
- $('a.nav.active').siblings('.sub-menu').show();
- jQuery.each($('a.nav.active').siblings('.sub-menu').find('li.sub-item a'), function() {
- if ($(this).attr("href") == window.location.pathname) {
- $(this).addClass("active");
- }
- });
- });
Add Comment
Please, Sign In to add comment