Team:Wageningen UR/templates/footer
From 2014.igem.org
(Difference between revisions)
Line 42: | Line 42: | ||
var divPos = $(theID).offset().top; // get the offset of the div from the top of page | var divPos = $(theID).offset().top; // get the offset of the div from the top of page | ||
var divHeight = $(theID).height(); // get the height of the div in question | var divHeight = $(theID).height(); // get the height of the div in question | ||
- | if (windowPos >= divPos && windowPos < (divPos + divHeight)) { | + | if (windowPos >= divPos && windowPos < (divPos + divHeight)) { |
$("a[href='" + theID + "']").addClass("sidenav-active"); | $("a[href='" + theID + "']").addClass("sidenav-active"); | ||
} else { | } else { |
Revision as of 12:24, 28 September 2014