Jquery 可排序、可拖动和可放下的拼图
Jquery Puzzle with sortable, draggable & droppable
我正在尝试构建一个小拼图。
没有必要使用我正在使用的库。
如果你试试我的fiddle:http://jsfiddle.net/fskwbrbb/
你怎么能把 Nr 3 拖到 "dropzone" 的顶部,然后把 Nr2 放在下面,但是 Nr1 在 Nr 1 的旁边?
------|
3 |
------|
----||---|
2 || 1 |
----||---|
为此我使用了 Jquery Shapeshift。
JS
//Create new container
$('#btnAddContainer').on('click', function () {
//Container HTML setup
var containerHtml = $('<div class="container"></div>');
//Insert continer
$('.containers').append(containerHtml);
//Shapeshift
$('.container').shapeshift({
enableDrag: true,
enableCrossDrop: true,
minColumns: 1
});
});
检查此 fiddle 代码:
https://jsfiddle.net/umcgqmwv/2/
我正在尝试构建一个小拼图。
没有必要使用我正在使用的库。
如果你试试我的fiddle:http://jsfiddle.net/fskwbrbb/
你怎么能把 Nr 3 拖到 "dropzone" 的顶部,然后把 Nr2 放在下面,但是 Nr1 在 Nr 1 的旁边?
------|
3 |
------|
----||---|
2 || 1 |
----||---|
为此我使用了 Jquery Shapeshift。
JS
//Create new container
$('#btnAddContainer').on('click', function () {
//Container HTML setup
var containerHtml = $('<div class="container"></div>');
//Insert continer
$('.containers').append(containerHtml);
//Shapeshift
$('.container').shapeshift({
enableDrag: true,
enableCrossDrop: true,
minColumns: 1
});
});
检查此 fiddle 代码:
https://jsfiddle.net/umcgqmwv/2/