gpt4 book ai didi

javascript - IE7 & jQuery-1.6.2 : List items being moved down go under the containing elements (multi list sorting)

转载 作者:行者123 更新时间:2023-11-28 12:25:38 25 4
gpt4 key购买 nike

我在 fiddle 上的代码: 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 < 9 代码时,我只能移动列表项一次。在那之后,一切都停止了。 =\webkit 检查器中没有错误/警告。 =\

最佳答案

我解决了这个问题只是删除了 e.stopPropagation();

不确定它为什么会出现在那里。 =\

关于javascript - IE7 & jQuery-1.6.2 : List items being moved down go under the containing elements (multi list sorting),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6862966/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com