$(document).ready(function(){ var full_path = location.href.split("#")[0]; $("#menu a").each(function(){ var $this = $(this); if($this.prop("href").split("#")[0] == full_path) { $this.addClass("act-link"); } }); });
Share