$(document).ready(function(){
let aray = Array.prototype.slice.call(document.querySelectorAll('a'));
console.log(aray);
aray.forEach(element => {
if(element.href === window.location.href){
let aa = [element];
[element][0].className = 'on';
}
});
})
(function ($) { $.getUrlParam = function (name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } })(jQuery); $(function () { let hrefLength = window.location.href.length; const newstring = window.location.href.substring(hrefLength-2, hrefLength) })