Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

continuous scrolling js

var scrollDirection = 10;
function pageScroll() {
    window.scrollBy(0,scrollDirection); // horizontal and vertical scroll increments
    scrolldelay = setTimeout('pageScroll()',5); // scrolls every 50 milliseconds
    if ( (window.scrollY === 0) || (window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
        scrollDirection = -1*scrollDirection;
    }
}
pageScroll();
Comment

PREVIOUS NEXT
Code Example
Javascript :: regex for comments javascript 
Javascript :: await on observable 
Javascript :: javascript set time to start of day 12 am 
Javascript :: find and filter 
Javascript :: jquery declare variable 
Javascript :: keydown events 
Javascript :: es6 node 
Javascript :: jQuery hasClass() - check for more than one class 
Javascript :: string concatenation in js 
Javascript :: how do i check if JQuery checkbox is checked 
Javascript :: jq each loop 
Javascript :: vue js import css from node modules 
Javascript :: jquery is element hidden 
Javascript :: last index of javascript 
Javascript :: js sum of int in array 
Javascript :: array map arrow function 
Javascript :: p5js circle 
Javascript :: style scoped vue 
Javascript :: how to convert integer to double in javascript 
Javascript :: check for duplicates in array javascript 
Javascript :: Downward Triangle Star Pattern in JavaScript 
Javascript :: how to get selected value of a dropdown menu in reactjs 
Javascript :: how to use trim in node js 
Javascript :: iterate array in javascrpt 
Javascript :: javascript code to open excel file and read contents 
Javascript :: get file extension nodejs 
Javascript :: selector id jquery but is variable 
Javascript :: js check if this last index in foreach 
Javascript :: integer to array javascript 
Javascript :: typescript express next middleware type 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =