javascript scrolltop

0

good I'm new in javascript I was trying a couple of things and I decided to use scrollTop but note that it did not work or I think

var elmnt = document.getElementById("move");
var x = elmnt.scrollLeft;
var y = elmnt.scrollTop;

when I put console.log(y) for example, it always gives me 0 even though I've scrolled

the HTML document is basic just place a div with id = "move" and add some paragraph to generate scroll all within body

    
asked by Carlos Puente 19.05.2018 в 05:20
source

0 answers