Constructor
new SimpleScrollFollow(elem, option)
Parameters:
Name | Type | Description |
---|---|---|
elem |
Object | プラグインを適用するHTML要素 |
option |
Object | オプションを格納した連想配列 |
Properties:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
option |
Object | オプションを格納した連想配列 | |||||||||||||||
follow |
Object | 追尾要素の情報を格納した連想配列
Properties
|
|||||||||||||||
timer |
Object | 連続したリサイズの発火を防ぐための遅延用のタイマー |
Methods
(private) _calcOffsetBottom(elem) → {number}
offset_bottomを算出する
Parameters:
Name | Type | Description |
---|---|---|
elem |
Object | 算出する対象のHTML要素 |
Returns:
- 算出されたoffset_bottom
- Type
- number
(private) _ehResize()
イベントハンドラ: 画面リサイズ
(private) _ehScroll()
イベントハンドラ: 画面スクロール
moveDefaultPosition(self)
元の位置に戻る
Parameters:
Name | Type | Description |
---|---|---|
self |
Object | このクラスのインスタンスオブジェクト |
setEnabled(bool)
スクロールを有効または無効にする
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean | true: 有効にする、 false: 無効にする |
setFollow(self, elem) → {Object}
追尾要素の設定をする
Parameters:
Name | Type | Description |
---|---|---|
self |
Object | このクラスのインスタンスオブジェクト |
elem |
Object | プラグインを適用するHTML要素 |
Returns:
- 追尾要素
- Type
- Object
setOption(self, option)
オプションを初期化する
Parameters:
Name | Type | Description |
---|---|---|
self |
Object | このクラスのインスタンスオブジェクト |
option |
Object | オプションを格納した連想配列 |