I am trying to use the Jquery UI sortable to connect lists of sortable items. Everything seems to be working fine, but I can’t seem to be able to get the connectWith property to do anything.
I have a fairly simple HTML page:
<div id="easy"></div>
<div id="medium"></div>
<div id="hard"></div>
and a little bit more JQuery:
var puzzles = {
easy: [1,2,3,4,5,6,7,8,9],
medium: [1,2,3,4,5,6],
hard: [1,2,3,4,5,6,7]
};
for (var i in puzzles) {
$("#" + i).append("<ul class='" + i + " '>");
for (var j = 0; j < puzzles[i].length; j++) {
$("ul." + i).append("<li id='" + i + "_" + j + "' class='" + i + "'>" + (j + 1) + "</li>");
}
}
$("ul").sortable({
connectWith: "ul"
}).disableSelection();
I have a demo page on JsFiddle.
The lists will sort nicely, but why won’t they connect?
Works with jQuery v1.5.2, but it breaks with jQuery v1.6.1 and above.
more info at jquery UI bugtracker, http://bugs.jqueryui.com/ticket/3739