title: Using ScrollTop in FlexBox does not work
body: <p>nav, main, footer, there are 3 tags. I applied them to FlexBox :</p>
  
  <pre><code>body {
    color: #ddd;
    font-family: Gotham;
    background: url(../assets/body-background.png);
    display: flex;
    min-height: 100%;
    flex-direction: column;
  }
  main {
    flex: 1;
  }
  </code></pre>
  
  <p>everything looks so good. but things are getting worse after that</p>
  
  <p>I have the following code in my script file (using jQuery):</p>
  
  <pre><code>$('.scroll-top').click(function () {
    $('body').animate({
       scrollTop: 0
    }, 1000);
  })
  </code></pre>
  
  <p>but the page scrolling animation is not working</p>
  
  <p><a href="https://jsfiddle.net/vcode/yex3199w/" rel="nofollow noreferrer">jsfiddle</a></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>$('a').click(function(){
   $('body').animate({
        scrollTop: 0
      }, 1000);
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>nav{
    padding: 10px;
    background: grey;
  }
  main{
    height:800px;
    background: lightgrey;
  }
  footer{
    padding: 10px;
    background: grey;
  }
  body{
    display: flex;
    min-height: 100vh;
    flex-direction: column;
  }
  main{
    flex: 1;
  }
  a{
    position: fixed;
    right: 40px;
    bottom: 40px;
  }</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;nav&gt;nav content&lt;/nav&gt;
  &lt;main&gt;main content&lt;/main&gt;
  &lt;a href="javascript:;"&gt;scroll top&lt;/a&gt;
  &lt;footer&gt;footer content&lt;/footer&gt;</code></pre>
  </div>
  </div>
  </p>