var first = $(location).attr('pathname'); first.indexOf(1); first.toLowerCase(); first = first.split("/")[1]; alert(first);
const firstPath = location.pathname.split('/')[1];