🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

SmoothAnchor.js is a jQuery plugin for smooth scrolling.

Animation

Documentation

jquery.smoothAnchor.js

Specification

  1. Put a hash after you scroll smoothly.
  2. Links of specifying the coordinates.
  3. Scroll to the position when the coordinate hash is attached to the load.
  4. It is possible to scroll smoothly at load time.
  5. Function is executed after the movement.
  6. Stop processing when you scroll the mouse during .

Usage

<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/smoothAnchor.js"></script> 

Init

$(window).smoothAnchorInit(); $('a[href^="#"]').smoothAnchor(); 

If you want to run with the tag of "a element" other than

$('h1').smoothAnchor({easing : 'easeOutQuart',speed : 1000,target: '#header'}); 

If you are running from Flash

ExternalInterface.call("smoothAnchor",{easing : "easeOutElastic",speed : 1000,target : "#header"}); 

It becomes the initial state if there is no argument.

Execution of the function after the movement

$('a[href^="#"]').smoothAnchor({ 	easing: 'easeOutQuart', 	speed: 1000, 	target: '#header', 	complate:'test' }); 

Scroll by specifying the coordinates

#1000,1000(x, y)

Options

Init

$(window).smoothAnchorInit({     easing: 'easeOutQuart',     speed: 1000,     complate:'',     isLoadedSmooth: true,     isLoadedSmoothQuestionMark: true,     isClickStop: false,     isTopScroll: true,     isLeftScroll: true }); $('a[href^="#"]').smoothAnchor({     easing: 'easeOutQuart',     speed: 1000,     delay: 0,     target: '#header',     complate: '',     isAddHash: true,     isTopScroll: true,     isLeftScroll: true }); 
  • easing: {String} Type of easing,
  • speed: {Number} speed,
  • delay: {Number} delay,
  • target: {String} '#header',
  • complate: {Function} Name of function to run after the scroll.
  • isAddHash: {Boolean} Whether or not to assign a hash after the scroll.
  • isTopScroll: {Boolean} Whether or not to scroll vertically.
  • isLeftScroll: {Boolean} Whether or not to scroll horizontally.
  • isLoadedSmooth: {Boolean} Whether or not to smooth scrolling after loading.
  • isLoadedSmoothQuestionMark: {Boolean} Whether or not to smooth scrolling using the "?" After loading.
  • isClickStop: {Boolean} Whether or not to stop the process when clicked.

License


You May Also Like