Mit jQuery Um Active Menüpunkt zu markieren

Hier ist ein jQuery-Snippet, das die aktuelle Seite URL überprüfen wird und vergleichen sie es mit den URLs im Menü und wenn sie übereinstimmen wird es eine Klasse, um den Menüpunkt hinzuzufügen.
<script type="text/javascript">
jQuery(document).ready(function($){
// Get current url
// Select an a element that has the matching href and apply a class of 'active'. Also prepend a - to the content of the link
var url = window.location.href;
$('.menu a[href="'+url+'"]').addClass('current_page_item');
});
</script>

Die obige Lösung wird nur für absolute URLs, die nicht auf jeder Website wird funktionieren, wenn sie relative URLs verwenden zu arbeiten.
var url = window.location.href;
// Will only work if string in href matches with location
$('.menu a[href="'+ url +'"]').addClass('active');
// Will also work for relative and absolute hrefs
$('.menu a').filter(function() {
return this.href == url;
}).addClass('active');

Quelle: http://www.paulund.co.uk/use-jquery-to-highlight-active-menu-item
Mit diesem Skript können Sie auch verwenden, um Gambio active Menü

wallpaper-1019588
Olympia 2036 / 2040 – diese Auswirkungen hätte eine erfolgreiche Bewerbung auf die lokale Wirtschaft in München
wallpaper-1019588
Time Patrol Bon: Neuer Trailer zeigt Theme Songs
wallpaper-1019588
Rinkai! – Neuigkeiten zum Cast bekannt gegeben
wallpaper-1019588
#1490 [Review] Manga ~ Cross Account