How to scroll one pixel from where you are on screen using jQuery

Recently I came across a scenario where on click of select all checkbox on Internet Explorer 11 all the other checkboxes were not updating visually. After doing some research I found that all the other checkboxes updated as soon as the page was scrolled up/down using the scrollbar, mouse wheel or the keyboard keys. So one way to do this was to refresh the page (which doesn’t make sense) and another way was to move the scrollbar of the page by 1 pixel up or down.

So to scroll one pixel from where you are on screen jQuery was used and this code was executed as soon as the state of other checkboxes were changed.

Code to scroll one pixel from where you are on screen jQuery:

$(window).scrollTop($(window).scrollTop()+1);