Skip to content

cse-coder/jquery-smooth-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smooth Scroll Plugin

Features

  • Allows for easy implementation of smooth scrolling for same-page links.
  • Works like this: $(‘a’).smoothScroll();
  • Specify a containing element if you want: $(‘#container a’).smoothScroll();
  • Exclude links if they are within a containing element: $(‘#container a’).smoothScroll({excludeWithin: [‘.container2’]});
  • Exclude links if they match certain conditions: $(‘a’).smoothScroll({exclude: [‘.rough’,‘#chunky’]});
  • Adjust where the scrolling stops: $(‘.backtotop’).smoothScroll({offset: -100});
  • Add a callback function that is triggered after the scroll is complete: $(‘a’).smoothScroll({afterScroll: function() { window.location.hash = this.hash; }});

Flaws

  • No history/back-button management

About

Automatically make same-page links scroll smoothly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 51.9%
  • HTML 44.7%
  • CSS 2.7%
  • Smarty 0.7%