$(document).ready(function(){
$(function(){
const selector = '.nav li';
const current = location.pathname;
$(selector ).each(function(){
const $this = $(this);
const className = $this.attr('class');
if ( className === current ) {
$this.addClass('active');
}
})
});
});