My code on a fiddle: http://jsfiddle.net/SMqR9/33/
The javascript for quicker reference:
$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();
});
Now, from a question earlier, someone came up with this code that fixes the z-index thing in IE:
$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');
});
}
which is fine for jQuery 1.3.2 (what I was on previously), but because of IE9, I needed to upgrade to the latest jQuery. When I use the IE < 9 code from above, I can only move the list items once. After that, everything stops. =\ There are no errors / warnings in the webkit inspector. =\
I fixed the problem just be removing the e.stopPropagation();
not sure why it was there in the first place. =\
精彩评论