title: javascript, offsetTop, offsetBottom
body: <p>I have a paragraph tag in my html id is move, I am trying to move the p tag to slowing fall down while on page load. but my code is not working.......</p>
  
  <pre><code>var speed = 12;
  var direction = 1;
  var getParagraph = document.getElementById("move");
  getParagraph.onmouseover =  moving;
  
  function moving() {
      var bo = getParagraph.offsetHeight;
      var boTop = getParagraph.offsetTop;
      var boBottom = boTop + bo;
  
      // When right side of the box goes too far - change direction:
      if (boBottom &gt; document.body.offsetHeight) {
          direction = -1;
      }
  
      // When left side of the box goes too far - change direction:
      if (boTop &lt; 0) {
          direction = 1;
      }
  
      // Recalculate position:
      getParagraph.style.Top = (boTop + speed * direction)
  }
  </code></pre>