Template:CU Boulder/iGEM
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(); });
}; /*Code modified from iGEM 2014 LMU-Munich team*/