Difference between revisions of "Team:Cambridge-JIC"

Line 74: Line 74:
 
     var i=0;
 
     var i=0;
 
     $("section.dotslide").each(function(){
 
     $("section.dotslide").each(function(){
         if($(this).offset().top <= 0/*$("body").scrollTop()*/) {
+
         if($(this).offset().top <= 50/*$("body").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")
i++;
 
 
         }
 
         }
     
+
      i++; 
 
     })
 
     })
 
})
 
})

Revision as of 17:56, 17 September 2015