Answers for "offset in js"

0

offset in js

var d = document.getElementById("div1");
var topPos = d.offsetTop;
 
if (topPos > 10) {
  // object is offset more
  // than 10 pixels from its parent
}
Posted by: Guest on October-07-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language