我的小提琴代码:
http://jsfiddle.net/SMqR9/33/
javascript以便快速参考:
$j = jQuery.noConflict();
$j(function() {
$j("#sort_content_41,#sort_content_40,#sort_content_42,#sort_content_39").sortable({
connectWith: '.section-content',
dropOnEmpty: true,
zIndex: 1004,
cursor: 'crosshair'
});
$j("#sort_sections").sortable({
placeholder: "ui-state-highlight",
connectWith: '.sections',
axis: 'y',
zIndex: 1003,
cursor: 'crosshair'
});
});
$j(function() {
$j("section-content").sortable({
connectWith: "section-content",
dropOnEmpty: true
});
$j(".section-content").disableSelection();
});
现在,从前面的问题开始,有人想出了以下代码来修复IE中的z-index问题:
$j('ul').bind('mousedown', function(e) {
e.stopPropagation();
if ($j.browser.msie && $j.browser.version < '9.0') $j(this).closest('.section').css('z-index', '5000');
});
if ($j.browser.msie && $j.browser.version < '9.0') {
$j('ul').bind('mouseup', function(e) {
$j(this).closest('.section').css('z-index', '1000');
});
}
这对于jQuery 1.3.2(我以前使用过的版本)很好,但是由于IE9,我需要升级到最新的jQuery。从上面使用IE Webkit检查器中没有错误/警告。 = \
最佳答案
我解决了这个问题,只是删除了e.stopPropagation();
不知道为什么会首先出现。 = \
关于javascript - IE7和jQuery-1.6.2:向下移动的列表项位于包含元素的下方(多列表排序),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6862966/