0
    <script src="http://code.jquery.com/jquery.js"> </script> 

         <script>   
            jQuery(document).ready(function(){

       jQuery('.scrollToTop').click(function(){ 
           $('html, body').animate({
              scrollTop: ($("#company_info").first().offset().top)
           }, 1200);
      });
    });
 </script> 
    <body>
                  <section class="get_started">
    <div class="container_12">
        <div class="grid_12 relative">
            <h2 id="gs_button"><a href="#company_info"><span>Get<br/> Started</span></a></h2>
        </div>`enter preformatted text here`
    </div>
    </section>
       <a style="display: inline;" href="#" class="scrollToTop">aaaaaaaaaaaaaaaaaaaaa</a>

    </body>
the scrolltoTop is working in firefox and this code is not working in chrome.

1 Answer 1

2

Just add id="company_info" in anchor tag <a id="company_info href="#">. Then it will work smoothly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.