JohnPaulDesign
11/11/2016 - 9:21 AM

Add active class to current page url

$(document).ready(function() {
   // get current URL path and assign 'active' class
   var pathname = window.location.pathname;
   $('.nav > li > a[href="'+pathname+'"]').parent().addClass('active');
})