Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Anchor scroll down https://css-tricks.com/snippets/jquery/smooth-scrolling/
- $(document).ready(function(){
- $('a[href^="#"].class_name').on('click',function (e) {
- e.preventDefault();
- var target = this.hash;
- var $target = $(target);
- $('html, body').stop().animate({
- 'scrollTop': $target.offset().top
- }, 900, 'swing', function () {
- window.location.hash = target;
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement