showing results for - "jquery scroll down 1 pixel"
Julieta
10 Mar 2019
1// try this code to scroll down 1px
2/*
3* - the code pretty much just uses .scrollTop() to get the work done.
4* - if you would like to scroll down more than 1px, simply increase the
5*	integer value (located close to the end of the code).
6*/
7
8jQuery(window).scrollTop(jQuery(window).scrollTop()+1);
9
10// OR (the shorthand version):
11
12$(window).scrollTop($(window).scrollTop()+1);
13
14/*
15* - NOTE: if you want this to fire after the document has loaded,
16*	then dont forget to wrap the code in $(document).ready() function:
17*/
18
19jQuery(document).ready(
20  function()
21  {
22   	jQuery(window).scrollTop(jQuery(window).scrollTop()+1); 
23  }
24);
25
26// Happy coding, my homies! <3