I'm using Bootstrap Affix to fix an element to the top of the window when it's scrolled past.
However in the android stock browser will calculate el.offset().top
relative to the window instead of the body. Which causes the Affix pluggin to change the class to affix-top
instead of affix
.
Is there another way to calculate the elements position relative to the body?
The css I use is a simple:
.affix {
position: fixed;
top: 0;
}