Add Active Class based on Url
$(function() { $('.account-side-pannel-menu a[href^="http://'+ location.hostname +'/account/' + location.pathname.split("/")[2] + '"]').parent().addClass('active'); });