I know that the css rule overflow-x:hidden
on the body
and html
elements can be used to prevent horizontal scrolling. But what to do if you want to use the jquery scrollTop(), that does not work if you have that particular css rule enabled?
I would really like to have both things working. Anyone with another idea for preventing horizontal scrolling?