Jquery UI 可排序 + Bootstrap 可变高度 Divs 排序问题
Jquery UI Sortable + Bootstrap variable height Divs sorting issue
需要您的帮助来解决有关 UI Sortable with bootstrap 的问题,我可以在 bootstrap 中实现此可排序功能,但仍然存在无法自行解决的问题.我的 Fiddle link : http://jsfiddle.net/wrtfp513/
问题 : 在这里(查看我的fiddle) 我分为三个部分(.part1,.part2,.part3) 我可以对我的'Test' 这三个部分中的任何内容但是当我将所有 'Test' 内容分类为 'part1' 时出现问题 'Not able to sort into .part2 as well as .part3 respectively'
我的代码:
<div class="container">
<div id="drag_holder" class="row">
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part1">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 1</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting indu Ipsum.</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 2</div>
<div class="panel-body">Contfghfghent</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 3</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry </div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part2">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 4</div>
<div class="panel-body">Content</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 5</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part3">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 6</div>
<div class="panel-body">Content</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 7</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. 1500s, when an unknown printer took a galley of type t </div>
</div>
</div>
</div>
</div>
</div>
脚本:
$(function () {
var demos =$("#drag_holder");
demos.sortable({
items: ".drag_content",
placeholder: "panel"
});
});
提前谢谢大家..
现在您正在使用 Jquery UI 进行拖放(可排序)。我明白你的问题。这可能是您指出的 Jquery UI 中的一个问题。因此,除了使用此 (Jquery UI),您还可以使用 dragula.js 来实现拖放功能。它有一个很棒的功能,同时将目标元素与它的阴影一起放置。
需要您的帮助来解决有关 UI Sortable with bootstrap 的问题,我可以在 bootstrap 中实现此可排序功能,但仍然存在无法自行解决的问题.我的 Fiddle link : http://jsfiddle.net/wrtfp513/
问题 : 在这里(查看我的fiddle) 我分为三个部分(.part1,.part2,.part3) 我可以对我的'Test' 这三个部分中的任何内容但是当我将所有 'Test' 内容分类为 'part1' 时出现问题 'Not able to sort into .part2 as well as .part3 respectively'
我的代码:
<div class="container">
<div id="drag_holder" class="row">
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part1">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 1</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting indu Ipsum.</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 2</div>
<div class="panel-body">Contfghfghent</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 3</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry </div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part2">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 4</div>
<div class="panel-body">Content</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 5</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-4 part3">
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 6</div>
<div class="panel-body">Content</div>
</div>
</div>
<div class="col-lg-12 drag_content">
<div class="panel panel-default">
<div class="panel-heading">Test 7</div>
<div class="panel-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. 1500s, when an unknown printer took a galley of type t </div>
</div>
</div>
</div>
</div>
</div>
脚本:
$(function () {
var demos =$("#drag_holder");
demos.sortable({
items: ".drag_content",
placeholder: "panel"
});
});
提前谢谢大家..
现在您正在使用 Jquery UI 进行拖放(可排序)。我明白你的问题。这可能是您指出的 Jquery UI 中的一个问题。因此,除了使用此 (Jquery UI),您还可以使用 dragula.js 来实现拖放功能。它有一个很棒的功能,同时将目标元素与它的阴影一起放置。