Team:LMU-Munich/iGEM.js
From 2014.igem.org
(Difference between revisions)
Hoerldavid (Talk | contribs) |
Hoerldavid (Talk | contribs) |
||
Line 27: | Line 27: | ||
}); | }); | ||
+ | |||
+ | $("#top-section").detach().appendTo("#footer"); | ||
+ | $("#top-section").css('position', 'relative'); | ||
// scroll-spy functionality moved to ajaxload.js | // scroll-spy functionality moved to ajaxload.js | ||
/* | /* |
Revision as of 01:09, 18 October 2014
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").not("#tour-toggle").hoverIntent(function(){ $(".nav-item.active").removeClass("active"); $(this).addClass("active"); $("#sub-navigation > ul").hide(); $("#" + this.id + "-sub").show(); });
$("#top-section").detach().appendTo("#footer"); $("#top-section").css('position', 'relative');
// scroll-spy functionality moved to ajaxload.js /* $('.scroll-spy').xscrolly({ change: function($el) { //$el.addClass('active'); // remove active $(".active-item").removeClass("active-item"); // reset navigation $(".nav-item.active").removeClass("active"); $(".current-top-nav").addClass("active"); $("#sub-navigation > ul").hide(); $("#" + $(".current-top-nav").attr('id') + "-sub").show(); // scroll spy console.log("#inpage-nav-" + $el.data("scroll")); $("#inpage-nav-" + $el.data("scroll")).addClass("active-item"); } }); */
};