You may want to try this for an older doctype in IE:
var top = (document.documentElement && document.documentElement.scrollTop) ||
document.body.scrollTop;
More Related Contents:
- Applying an ellipsis to multiline text [duplicate]
- How to modify the fill color of an SVG image when being served as background image?
- Freeze the top row for an html table only (Fixed Table Header Scrolling)
- CSS – How to Style a Selected Radio Buttons Label?
- Style input type file? [duplicate]
- Table with fixed header and fixed column on pure css
- How to display scroll bar onto a html table
- Why can’t I center with margin: 0 auto?
- White space at top of page
- Why are dashes preferred for CSS selectors / HTML attributes?
- Style not working for innerHTML in Angular [duplicate]
- How to Set Height for the Drop Down of Select box
- Is it possible to always show up/down arrows for input “number”?
- How to center-align one flex item and right-align another using Flexbox [duplicate]
- How can I put DIV in P?
- When I try to shift the image upwards using negative margin the whole container is moved upwards
- What is the browser-default background color when selecting text?
- How to center image horizontally within a div element?
- CSS Expressions
- How do I get a flexbox to have a center fixed and a bottom fixed children together?
- What’s the difference between HTML’s and CSS’s width attribute?
- Why does the general-sibling combinator allow toggling pseudo-element’s content, but not the adjacent-sibling?
- How do I make flex box work in safari?
- Zebra striping a flexbox table with wrapping items
- Removing unwanted table cell borders with CSS
- Transparent scrollbar with css
- Make A List Item Clickable (HTML/CSS)
- Bootstrap row and col explanation
- How to center and crop an image to always appear in square shape with CSS?
- inline-block element with no text renders differently