Difference between revisions of "Team:TU Darmstadt/Templates/SideBarMenu"
Line 198: | Line 198: | ||
path = decodeURIComponent(path); | path = decodeURIComponent(path); | ||
− | $('a').each(function () { | + | $('#menuContainer a').each(function () { |
var href = $(this).attr('href'); | var href = $(this).attr('href'); | ||
− | if (path.substring(0, href.length) | + | if (href === path.substring(0, href.length)) { |
− | + | $(this).addClass('active'); | |
} | } | ||
}); | }); | ||
} | } | ||
+ | |||
</script> | </script> | ||
</html> | </html> |
Revision as of 18:42, 17 September 2015