Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
jQuery Auto Active Menu
// this function will active menu using href match
// Author:
function auto_active_menu() {¬
var url = window.location.href;¬
// Work for relative and absolute hrefs¬
$('.menu a').filter(function() {
return this.href == url;¬
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment