Home › Forums › JavaScript › Change Body Border color on Scroll › Reply To: Change Body Border color on Scroll
March 13, 2014 at 6:34 am
#165653
Participant
Is it possible to get the body height as a an initial variable(?) and then use percentage values instead of fixed pixels.
$('body').height();
Would get the height of the body. This would work if you know there isn’t going to be any DOM changes (ie display none, height/width changes, font size changes, ect) when you are trying calculate the height value and % otherwise will throw things off. Again, if you don’t do any of that then it is a valid solution.