title: How my page scroll down with smooth scrolling
body: <p>I used the script for smooth scrolling my page, but the script does not work i am very confused where i am wrong please help me</p>
  
  <p>My script is:</p>
  
  <pre><code>$(".scroll").click(function(event){
       event.preventDefault();
       //calculate destination place
       var dest=0;
       if($(this.hash).offset().top &gt; $(document).height()-$(window).height()){
            dest=$(document).height()-$(window).height();
       }else{
            dest=$(this.hash).offset().top;
       }
       //go to destination
       $('html,body').animate({scrollTop:dest}, 1000,'swing');
   });
  </code></pre>
  
  <p>and i used .scroll in anchor tag this type:</p>
  
  <pre><code>&lt;a class="scroll" href="#bot"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>Please help me!  </p>