The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Change Body Border color on Scroll Reply To: Change Body Border color on Scroll


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.