var url = window.location // for sidebar menu entirely but not cover treeview $('ul.sidebar-menu a').filter(function() { return this.href == url; }).parent().addClass('active'); // for treeview $('ul.treeview-menu a').filter(function() { return this.href == url; }).parentsUntil(".sidebar-menu > .treeview-menu").addClass('active');


window.location을 이용하여 url을 가져오고,

메뉴의 링크와 비교하여 같다면 active class를 추가한다.


+ Recent posts