我在我的asp.net应用程序中使用此示例(http://webdeveloperplus.com/jquery/saving-state-for-collapsible-drag-drop-panels/)。我在Firefox以外的所有浏览器中都可以排序,因为某些原因它会触发事件,但从不进入代码。排序不工作在Firefox,但每隔一个浏览器
$('.column').sortable({
connectWith: '.column',
handle: 'h2',
cursor: 'move',
placeholder: 'placeholder',
forcePlaceholderSize: true,
opacity: 0.4,
start: function (event, ui) {
//Firefox, Safari/Chrome fire click event after drag is complete, fix for that
if ($.browser.mozilla || $.browser.safari)
$(ui.item).find('.dragbox-content').toggle();
},
stop: function (event, ui) {
ui.item.css({ 'top': '0', 'left': '0' }); //Opera fix
updateWidgetData();
}
})
.disableSelection();
});
这是不是一个完整的,可执行的例子。也许http://www.javascriptlint.com/online_lint.php会给你一些想法。 – David