按照排序拖拽,可以在指定的框内拖拽

时间:2018-08-16 08:10:03
【文件属性】:
文件名称:按照排序拖拽,可以在指定的框内拖拽
文件大小:2KB
文件格式:ZIP
更新时间:2018-08-16 08:10:03
拖拽 按照排序拖拽,可以在指定的框内拖拽$('.drag').draggable({ appendTo: 'body', helper: 'clone' }); $('#dropzone').droppable({ activeClass: 'active', hoverClass: 'hover', accept: ":not(.ui-sortable-helper)", // Reject clones generated by sortable drop: function (e, ui) { var $el = $('
' + ui.draggable.text() + '
'); $el.click(function () { $(this).detach(); }); $(this).append($el); } }).sortable({ items: '.drop-item', sort: function() { // gets added unintentionally by droppable interacting with sortable // using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options $( this ).removeClass( "active" ); } });
【文件预览】:
拖拽
----css()
--------style.css(417B)
----index.html(834B)
----js()
--------index.js(697B)

网友评论