Class: SimpleScrollFollow

SimpleScrollFollow

要素ごとに適用される処理を集めたクラス

Constructor

new SimpleScrollFollow(elem, option)

Parameters:
Name Type Description
elem Object プラグインを適用するHTML要素
option Object オプションを格納した連想配列
Properties:
Name Type Description
option Object オプションを格納した連想配列
follow Object 追尾要素の情報を格納した連想配列
Properties
Name Type Description
elem Object 追尾するHTML要素のjQueryオブジェクト
offset_top number 追尾要素の元々のオフセット・トップ
offset_bottom number 追尾要素の元々のオフセット・ボトム
position_top number 追尾要素の元々のポジション・トップ
timer Object 連続したリサイズの発火を防ぐための遅延用のタイマー
Source:

Methods

(private) _calcOffsetBottom(elem) → {number}

offset_bottomを算出する
Parameters:
Name Type Description
elem Object 算出する対象のHTML要素
Source:
Returns:
- 算出されたoffset_bottom
Type
number

(private) _ehResize()

イベントハンドラ: 画面リサイズ
Source:

(private) _ehScroll()

イベントハンドラ: 画面スクロール
Source:

moveDefaultPosition(self)

元の位置に戻る
Parameters:
Name Type Description
self Object このクラスのインスタンスオブジェクト
Source:

setEnabled(bool)

スクロールを有効または無効にする
Parameters:
Name Type Description
bool boolean true: 有効にする、 false: 無効にする
Source:

setFollow(self, elem) → {Object}

追尾要素の設定をする
Parameters:
Name Type Description
self Object このクラスのインスタンスオブジェクト
elem Object プラグインを適用するHTML要素
Source:
Returns:
- 追尾要素
Type
Object

setOption(self, option)

オプションを初期化する
Parameters:
Name Type Description
self Object このクラスのインスタンスオブジェクト
option Object オプションを格納した連想配列
Source: