Yes, ScrollTop Jquery not working in Boostrap because overflow:auto. To solve this, we need to use div that using “overflow:auto” and solve by :
1 2 3 4 5 6 7 8 9 10 11 12 | <script type="text/javascript"> $(document).ready(function() { /* smooth scrolling for scroll to top */ // scroll to top action $(‘a.scroll-top’).click(function(event) { jQuery(‘#main’).animate({ scrollTop: jQuery(‘#main’).scrollTop() + jQuery(‘#main’).position().top – 3500 }, 500); }); }); </script> |