1
0
mirror of https://github.com/hacks-guide/Guide_3DS.git synced 2025-08-30 03:39:50 +02:00

fix sidebar for translation pages (previously, for example, es_ES matched all es_ES pages, so home was always highlighted)

This commit is contained in:
Plailect
2017-09-29 10:14:22 -04:00
parent 67d8e3aed9
commit 676a070240
2 changed files with 6 additions and 2 deletions

View File

@@ -207,7 +207,8 @@ $(document).ready(function(){
} }
ol.children().each(function(idx, li) { ol.children().each(function(idx, li) {
var link = $(li).find("a").attr('href'); var link = $(li).find("a").attr('href');
if(window.location.href.indexOf(link) > -1 && link !== "/"){ var name = $(li).attr('data-name');
if(window.location.href.indexOf(link) > -1 && name !== "home"){
$(li).addClass("active"); $(li).addClass("active");
return false; return false;
} }

File diff suppressed because one or more lines are too long