【发布时间】:2011-08-01 22:23:24
【问题描述】:
我的小提琴代码: 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
【问题讨论】:
-
对不起,我对你的实际问题有点困惑。您发现哪个浏览器有问题? (我刚刚在 IE8 中尝试了你的 jsfiddle——它将运行“低于 IE9”的代码),这很好,但你提到了一个 webkit 检查器,这意味着你在 Chrome/Safari 中看到了这个问题?)跨度>
标签: javascript jquery css internet-explorer