Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 365: Line 365:
$(menu_buttons[i]).parent("tr").siblings(":last").children("td").filter(function(index) {return index==i}).children("a").addClass("selflink");
$(menu_buttons[i]).parent("tr").siblings(":last").children("td").filter(function(index) {return index==i}).children("a").addClass("selflink");
}
}
-
 
+
 
if (touchscreen) continue;
if (touchscreen) continue;
Line 392: Line 392:
children[active-1].style.display = "block";
children[active-1].style.display = "block";
}
}
 +
 +
menu_links = $("#side_menu_items > li > a");
 +
 +
    for (var j=0; j < menu_links.length; j++) {
 +
            active=1;
 +
            if (menu_links[j].href.indexOf("Team:Edinburgh/") > -1) {
 +
                if (window.location.href.indexOf(menu_links[j].href) > -1) {
 +
                    active = 3;
 +
                }
 +
            } else if ($(".home_side_menu_item").length> 0 ) {
 +
active = 3;
 +
            }
 +
 +
if (active==3) {
 +
$(menu_links[j]).addClass("selflink");
 +
}
 +
}
         })();       
         })();       
   }
   }

Revision as of 23:46, 4 October 2013