Skip to content

Instantly share code, notes, and snippets.

@shehabkhan013
Created January 23, 2018 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shehabkhan013/b3e2c15f1e6ae5b4b2e5ba79de54bfb0 to your computer and use it in GitHub Desktop.
Save shehabkhan013/b3e2c15f1e6ae5b4b2e5ba79de54bfb0 to your computer and use it in GitHub Desktop.
menu-active > li addClass
li.current_page_item
--------------------------
$(".header-menu li a").each(function () {
if ($(this).attr("href") == pgurl || $(this).attr("href") == pgurl + '.html') {
$(this).parent().addClass("current_page_item");
$(this).parents('li').addClass("current_page_item");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment