當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


JQuery UI Sortable cursorAt用法及代碼示例

用法:

cursorAt
類型:Object
默認:false
移動排序元素或助手,使光標始終顯示為從同一位置拖動。坐標可以使用一個或兩個鍵的組合作為散列給出:{ top, left, right, bottom }

代碼示例:

使用指定的 cursorAt 選項初始化可排序:

$( ".selector" ).sortable({
  cursorAt: { left: 5 }
});

初始化後獲取或設置cursorAt選項:

// Getter
var cursorAt = $( ".selector" ).sortable( "option", "cursorAt" );
 
// Setter
$( ".selector" ).sortable( "option", "cursorAt", { left: 5 } );

相關用法


注:本文由純淨天空篩選整理自jqueryui.com大神的英文原創作品 Sortable cursorAt。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。