Skip to content

.selection('setPos', opts)

madapaja edited this page May 9, 2012 · 1 revision

キャレット位置を設定します

example

// 2文字目から5文字目までを選択
$('#textarea').selection('setPos', {start: 2, end: 5});

パラメータ

opts.start {Integer}

選択開始位置(位置は0から数えます)

opts.end {Integer}

選択終了位置(位置は0から数えます)

Clone this wiki locally