文档详情

sortable参数表(国外英文资料).doc

发布:2017-06-06约1.17万字共17页下载文档
文本预览下载声明
sortable参数表(国外英文资料) All event callback functions have two parameters: event and UI, the browser has the event object, and the encapsulated UI object A JQuery object that represents a sortable element, usually a clone of the current element UI. Position - represents the cursor over the current object, the cursor object {top, left} UI. Offset - indicates the cursor value object {top, left} relative to the current page UI. Item - the element that represents the current drag The UI. Placeholder - placeholder (if defined) The sortable object that is the owner of the current drag-and-drop element (useful only when the element is passed from another sortable object) · parameter (parameter name: parameter type: default) AppendTo: parent Where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues). Initial: $(.selector ).sortable ({appendTo: body); Get: var appendTo = $(.selector ).sortable ( option , appendTo); Setup: $(.selector ).sortable ( option , appendTo, body); Axis: String: false If set, the element can be dragged horizontally or vertically. Optional: x, y Initial: $(.selector ).sortable ({axis: x}); Get: var axis = $(.selector ).sortable ( option ); Setup: $(.selector ).sortable ( option , axis, x ); Cancel: Selector: : input, button Stop the sort action happening on the matched elements. Initial: $(.selector ).sortable ({cancel: button}); Get: var cancel = $(.selector ).sortable ( option ). Setup: $(.selector ).sortable ( option , cancel, button); ConnectWith: Selector: false Allowing the sortable object to connect to another sortable object can drag the item element to another. Initial: $(.selector ).sortable ({connectWith: .otherlist }) Access: var connectWith = $(.selector ).sortable ( option , connectWith); Setup: $(.selector ).sortable ( option , connectWith, .otherlist ); Containment: Element, String, Selector: false The constraint sort action only occurs within a specified scope. Optional: D
显示全部
相似文档