Home › Forums › JavaScript › Change Body Border color on Scroll › Reply To: Change Body Border color on Scroll
March 13, 2014 at 3:07 am
#165632
Member
The problem with this system is that it is fragile. Depending on the user’s browser window size and/or resolution of their monitor scrollTop() will have varying results used this way. This even breaks adjusting the height of the view on codepen.
Hmmm…I suspected as much.
Is it possible to get the body height as a an initial variable(?) and then use percentage values instead of fixed pixels.
Eg..After I have scrolled 25% of the way to the bottom I get another color then after 50% yet another and so on?