CSS
html, body {
width: 100%;
overflow-x: hidden
}
Setting above CSS in a page removes scroll from window [but triggers it on body], hence
pageOffset = (window.pageYOffset && { X: window.pageXOffset, Y: window.pageYOffset }) || {},
dElementOffset = (dE && { X: dE.scrollLeft, Y: dE.scrollTop }) || {},
dBodyOffset = (dB && { X: dB.scrollLeft, Y: dB.scrollTop }) || {};
[db = document.body, dE = document.documentElement]
None of the above code gives the number of pixels scrolled. Is there a way to determine scroll values in such cases? http://jsbin.com/zayem/1/edit?html,css,js,console,output [Need to load it in a separate html file; Linked it just for understanding]