Hallo,
ich habe mir in eine Website die SpasticNav Navigation eingebaut. Hier zu finden:
https://github.com/gautch/SpasticNav
Jetzt habe ich im Template folgendes eingebaut:
<script type="text/javascript">
$('#nav').find('li').each(function(i, ele){
if (window.location.href.indexOf($(this).find('a').attr('href')) >= 0) {
this.id = "selected";
}
});
</script>
Damit wird der Menüpunkt der ausgewählten Seite angezeigt. Da ich aber noch ein zweites Menü habe, wo Seiten aufgerufen werden, die nicht in der SpasticNav Navigation vorkommen, bräuchte ich eine Modifikation des Scripts.
Wie kann man also in dem obigen Script einbauen, dass wenn es keine Seite findet, die im SpasticNav vorkommt es diese Seite als selected nimmt.
href="http://www.website.de/pages/start.php
Hoffe ich habe mich als NOOB richtig ausgedrückt und Ihr könnt mir helfen[Blockierte Grafik: http://www.traum-projekt.com/forum/images/smilies/smile.gif]
Herzlichen Dank
Craxx[Blockierte Grafik: http://www.traum-projekt.com/forum/images/smilies/wink.gif]