Wednesday, January 13, 2016

Shaky Fixed Backgrounds on IE 11

Sometimes on IE 11, there will be a shaky scroll on backgrounds / images that only appears in IE.

If a user were to go to Internet Options > Advanced > and UNCHECK Smooth Scrolling, this would fix the problem. However, assuming most users have it checked by default.. here is how to fix the issue using JavaScript. I am using Angular JS so I put it in the controller loaded on the page that needs the function and put it in the init function. If you are not using Angular, then just take the if statement part out, ignore the init() and place it as needed.

I also added a .1 * wd in there in case you need to adjust the speed the page gets scrolled when the user uses the mousewheel. Since ours was moving way, way too fast.. we had to multiply it by .1 to make it slower. Multiply by a whole number to make it faster.

Credit to here: