Difference between revisions of "Team:Cambridge-JIC/TestHome"
Line 65: | Line 65: | ||
var i=0; | var i=0; | ||
$("section").each(function(){ | $("section").each(function(){ | ||
− | if($(this).offset().top < $(window).scrollTop()) { | + | if($(this).offset().top <= $(window).scrollTop()) { |
$(".sidebar-item").css("background", "none") | $(".sidebar-item").css("background", "none") | ||
$($(".sidebar-item").get(i)).css("background", "#555") | $($(".sidebar-item").get(i)).css("background", "#555") |
Revision as of 02:12, 4 August 2015