Difference between revisions of "Team:ATOMS-Turkiye/iGEM"
(Created page with "var initiateNavigation = function(id){ $("#"+id).addClass("current-top-nav"); $(".nav-item.active").removeClass("active"); $("#"+id).addClass("active"); $("#su...") |
|||
Line 30: | Line 30: | ||
{ | { | ||
case "Tour": | case "Tour": | ||
− | case " | + | initiateNavigation("tour"); |
+ | break; | ||
+ | case "Problems": | ||
+ | case "Ulcer": | ||
+ | case "Cancer_Switch": | ||
+ | case "Modelling": | ||
initiateNavigation("project"); | initiateNavigation("project"); | ||
break; | break; | ||
Line 36: | Line 41: | ||
initiateNavigation("results"); | initiateNavigation("results"); | ||
break; | break; | ||
− | case " | + | case "Virtual_Hospital": |
+ | case "SynBio_Day": | ||
+ | case "Outreach": | ||
+ | case "Street_Interview": | ||
initiateNavigation("pp"); | initiateNavigation("pp"); | ||
break; | break; | ||
− | case " | + | case "ATOMs": |
− | case " | + | case "Attribitions": |
+ | case "Collaboration": | ||
+ | case "Official_Team_Profile": | ||
+ | case "Acknowledgements": | ||
initiateNavigation("team"); | initiateNavigation("team"); | ||
break; | break; | ||
− | case " | + | case "Notebook": |
+ | case "Protocols": | ||
+ | case "Achievements": | ||
+ | case "Official_Part_Page": | ||
initiateNavigation("extras"); | initiateNavigation("extras"); | ||
break; | break; | ||
} | } | ||
}; | }; |
Revision as of 22:59, 18 September 2015
var initiateNavigation = function(id){
$("#"+id).addClass("current-top-nav"); $(".nav-item.active").removeClass("active"); $("#"+id).addClass("active"); $("#sub-navigation > ul").hide(); $("#" + id + "-sub").show(); $.fn.xscrolly = function(options, key, value) { if (options === 'option') { this.data('xscrolly').option(key, value); } else { options.targets = this; this.data('xscrolly', new XScrollY(options)); } return this;
};
};
window.onload = function(){
//hoverIntent is used for predicting user mouse intentions $(".nav-item").hoverIntent(function(){ $(".nav-item.active").removeClass("active"); $(this).addClass("active"); $("#sub-navigation > ul").hide(); $("#" + this.id + "-sub").show(); }); var pathname = window.location.pathname.split("/").pop();
switch(pathname) {
case "Tour": initiateNavigation("tour"); break; case "Problems": case "Ulcer": case "Cancer_Switch": case "Modelling": initiateNavigation("project"); break; case "Results": initiateNavigation("results"); break; case "Virtual_Hospital": case "SynBio_Day": case "Outreach": case "Street_Interview": initiateNavigation("pp"); break; case "ATOMs": case "Attribitions": case "Collaboration": case "Official_Team_Profile": case "Acknowledgements": initiateNavigation("team"); break; case "Notebook": case "Protocols": case "Achievements": case "Official_Part_Page": initiateNavigation("extras"); break;
} };