小编Nic*_*ick的帖子

jQuery draggable隐藏CSS3多列

我正在尝试拖放多个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)

jquery jquery-ui draggable css3 multiple-columns

6
推荐指数
1
解决办法
449
查看次数

Ruby的哈希数组,比较2个键并加上另一个键/值

在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)

如果数组有多个哈希,其中:qtyis nil和 …

ruby arrays hash

2
推荐指数
1
解决办法
1014
查看次数

标签 统计

arrays ×1

css3 ×1

draggable ×1

hash ×1

jquery ×1

jquery-ui ×1

multiple-columns ×1

ruby ×1