Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Вешаем событие прокрутки на все якоря (#) на странице */
- $('a[href^="#"]').bind('click.smoothscroll', function (e) {
- e.preventDefault();
- var target = this.hash,
- $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