jquery.initscroll

0.0.2 • Public • Published

jQuery.initScroll

ハッシュ付きURLにアクセスした時、対象の要素までスクロールさせるjQueryプラグイン

Installation

npm install --save jquery.initscroll

Usage

<script src="jquery.min.js"></script>
<script src="jquery.initscroll.min.js"></script>
<script>
  $(function() {
    $('html,body').initScroll(options);
  });
</script> 

Options

  • offset
    Type: number
    Default: 0
    本来のスクロール位置から移動させる

  • offsetObject
    Type: jQuery Object
    Default: null
    指定したオブジェクトの位置と高さ分、本来のスクロール位置から移動させる

  • duration
    Type: number
    Default: 600
    スクロール時間(ミリ秒)

  • easing
    Type: string
    Default: 'swing'
    イージングの種類
    ※jQuery単体では「linear」と「swing」の2種類だけなので、それ以外を指定する場合は別途「jQuery Easing Plugin」等が必要

jQuery Support

  • 3.0.0+
  • 2.0.0+
  • 1.8.0+

Browser Support

  • Google Chrome
  • Safari
  • Firefox
  • Edge
  • IE 9+

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i jquery.initscroll

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • stsok