在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:farhadi/html5sortable开源软件地址:https://github.com/farhadi/html5sortable开源编程语言:HTML 59.3%开源软件介绍:DEPRECATION NOTICEThis project is not mantained anymore. I recommend using RubaXa's Sortable or voidberg's fork instead. HTML5 Sortable jQuery PluginFeatures
UsageUse $('.sortable').sortable(); Use Use $('.sortable').sortable().bind('sortupdate', function(e, ui) {
//ui.item contains the current dragged element.
//Triggered when the user stopped sorting and the DOM position has changed.
}); Use $('.sortable').sortable({
items: ':not(.disabled)'
}); Use $('.sortable').sortable({
handle: 'h2'
}); Setting $('.sortable').sortable({
forcePlaceholderSize: true
}); Use $('#sortable1, #sortable2').sortable({
connectWith: '.connected'
}); To remove the sortable functionality completely: $('.sortable').sortable('destroy'); To disable the sortable temporarily: $('.sortable').sortable('disable'); To enable a disabled sortable: $('.sortable').sortable('enable'); The API is compatible with jquery-ui. So you can use jquery-ui as a polyfill in older browsers: yepnope({
test: Modernizr.draganddrop,
yep: 'jquery.sortable.js',
nope: 'jquery-ui.min.js',
complete: function() {
$('.sortable').sortable().bind('sortupdate', function(e, ui) {
//Store the new order.
}
}
}); LicenseReleased under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论