{hero}

scroller.toPosition()

自:Scroller 1.5.0 起

滾動到特定的列顯示索引。
請注意 - 此屬性需要 DataTables 的 Scroller 擴展功能。

描述

此方法可用於將滾動位置移動到目前顯示順序中的指定列。如果您知道要滾動到的列,請使用 row().scrollTo() 方法 - 此方法適用於您不知道要滾動到的位置是哪一列的情況!

類型

function scroller.toPosition( index [, animate ] )

描述

移動顯示以顯示指定索引的列。

參數
回傳值

用於鏈接的 DataTables API 實例

範例

動畫滾動到顯示索引 100

table.scroller.toPosition(100);

相關

以下選項直接相關,也可能在您的應用程式開發中很有用。