dragsort- jQuery 框架排序小工具

网友投稿 1364 2022-10-08

dragsort- jQuery 框架排序小工具

dragsort- jQuery 框架排序小工具

dragsort 是一个 JavaScript 文件,允许用户在 jQuery 框架上通过拖拽来来做列表排序。

用法:

$("ul").dragsort({ dragSelector: "li", dragEnd: function() { }, dragBetween: false, placeHolderTemplate: "" });$("ul").dragsort("destroy");

dragSelector:The [CSS selector](http://api.jquery.com/category/selectors/) of the elementinside the list item to act as the drag handle. The default is the list itemitself e.g. LI.
dragSelectorExclude:The css selector of the elements inside the dragSelector to not triggerdragsort. The default is "input, textarea".
itemSelector:The css selector of the list items that are moveable. Will only match elementsthat are immediate children of list container. The default is tag name offirst child e.g. LI.
dragEnd:The callback function that will be called after the dragging has ended (onlycalled if the list order has changed). The keyword "this" in function willrefer to list item that was dragged.
dragBetween:Set to "true" if you want to enable the ability to drag between selected listsor to allow dragging of the list item outside of the list for auto scroll. Thedefault is false.
placeHolderTemplate:The html of the place holder for the dragged item. The default is empty listitem e.g."".
scrollContainer:The css selector of the element you want to scroll (i.e. div with overflow setto auto) when the list item is dragged outside the list. The default iswindow.
scrollSpeed:A number that represents the speed that the page will scroll when dragging anitem outside the scroll container, a higher value is faster and a lower valueis slower. Set to 0 to disable scrolling. The default is 5.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:struts2映射jsp页面的第一种方法
下一篇:自定义我的拦截器
相关文章

 发表评论

暂时没有评论,来抢沙发吧~