Jquery中文网 www.jquerycn.cn
Jquery中文网 >  jQuery  >  jQuery 插件  >  正文 Table row drag and drop

Table row drag and drop

发布时间:2014-06-27   编辑:www.jquerycn.cn
Drag and drop table rows to reorganise data. onDragStart and onDrop config options allow you to integrate this with Ajax calls to update the server. Options onDragStyle This is the style that is assigned to the row during drag. There are limitations to th
Drag and drop table rows to reorganise data. onDragStart and onDrop config options allow you to integrate this with Ajax calls to update the server.OptionsonDragStyleThis is the style that is assigned to the row during drag. There are limitations to the styles that can be associated with a row (such as you can't assign a border—well you can, but it won't be displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as a map (as used in the jquery css(...) function).onDropStyleThis is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations to what you can do. Also this replaces the original style, so again consider using onDragClass which is simply added and then removed on drop.onDragClassThis class is added for the duration of the drag and then removed when the row is dropped. It is more flexible than using onDragStyle since it can be inherited by the row cells and other content. The default is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your stylesheet.onDropPass a function that will be called when the row is dropped. The function takes 2 parameters: the table and the row that was dropped. You can work out the new order of the rows by using table.tBodies[0].rows.onDragStartPass a function that will be called when the user starts dragging. The function takes 2 parameters: the table and the row which the user has started to drag.scrollAmountThis is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, FF3 beta)

您可能感兴趣的文章:
Table row drag and drop
jQuery EasyUI 扩展
jQuery UI库
html5的drag和drop的用法示例(代码)
Simple Tree +Drag'nDrop
Table Hover
各种效果的jquery ui(接口)介绍
html5规定元素是否可拖动的属性draggable
Drop Shadow
mysql实例 IF Else语句的例子

[关闭]