title: How to I transition my Img size as I am scrolling down
body: <p>I am making a project where I have images animating on a screen as I am scrolling down.I have tried animate but it doesnt seem like it is going with the scroll if i constantly keep going up&amp;down.Hope what i provided helps.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(window).scroll(function() {
    var rep = $(window).scrollTop();
  
    if (rep &gt; 860) {
      $('.teaimg').fadeIn();
    }
    if (rep &lt; 860) {
      $('.teaimg').fadeOut();
    }
    
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.teaimg {
    background-image: url("leaf.jpg");
    width: 779px;
    height: 439px;
    position: absolute;
    top: 0;
    display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;main&gt;
    &lt;div class="laptopbox1"&gt;
      &lt;img id="laptop" src="laptop.jpg"&gt;
      &lt;div id="screen"&gt;
        &lt;p id="text"&gt;&lt;/p&gt;
        &lt;div class="teaimg"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/main&gt;</code></pre>
  </div>
  </div>
  </p>