我正在尝试拖放多个CSS3列.我遇到的问题是拖拽在它旁边的列后面.如果我不使用CSS3列,那么它工作正常.
看到这个Codepen.
HTML:
<div class='row-fluid recurring-items'>
<div class='recurring-items-aisle'>
<h4 class='recurring-items-header'>
Baking
</h4>
<ul class='unstyled recurring-aisle' id="aisle-11">
<li class='recurring-item'>
<!-- <i class='icon-reorder handle has-tooltip' title="drag to another aisle"></i> -->
<span class='handle'>H</span>
All Purpose Flour
<!-- <i class='icon-remove-circle has-tooltip' title='Remove item' data-remove-url></i> -->
</li>
<li class='recurring-item'>
<!-- <i class='icon-reorder handle has-tooltip' title="drag to another aisle"></i> -->
<span class='handle'>H</span>
Sugar
<!-- <i class='icon-remove-circle has-tooltip' title='Remove item' data-remove-url></i> -->
</li>
<li class='recurring-item'>
<!-- <i class='icon-reorder handle has-tooltip' title="drag to another aisle"></i> --> …
Run Code Online (Sandbox Code Playgroud) 在Ruby中我有以下哈希数组:
[
{:qty => 1, :unit => 'oz', :type => 'mass'},
{:qty => 5, :unit => 'oz', :type => 'vol'},
{:qty => 4, :unit => 'oz', :type => 'mass'},
{:qty => 1, :unit => 'lbs', :type => 'mass'}
]
Run Code Online (Sandbox Code Playgroud)
我需要做的是通过:unit
和比较元素:type
,然后求:qty
它们相同的时间.生成的数组应如下所示:
[
{:qty => 5, :unit => 'oz', :type => 'mass'},
{:qty => 5, :unit => 'oz', :type => 'vol'},
{:qty => 1, :unit => 'lbs', :type => 'mass'}
]
Run Code Online (Sandbox Code Playgroud)
如果数组有多个哈希,其中:qty
is nil
和 …