I know this question have been asked alot, but i can't find a fix...
<script>
$(function () {
var url = window.location.href;
var page = url.substr(url.lastIndexOf('/') + 1);
target = $('.ActiveMenu a[href*="' + page + '"]');
$(target).addClass('active');
console.log(target);
});
</script>