2014-10-20 45 views
1

我使用http://johnny.github.io/jquery-sortable/为我的表,以拖曳和排序元素。 但是我开始拖动一个项目时显示红色箭头的问题。红色的箭头似乎是缺少的......这里有人知道如何显示它吗?jquery-sortable不显示红色箭头

下面是JavaScript代码到目前为止,我已经试过:

$(document).ready(function() { 
     $('.sorted_table').sortable({ 
      containerSelector: 'table', 
      itemPath: '> tbody', 
      itemSelector: 'tr', 
      placeholder: '<tr class="placeholder"/>' 
     }); 
}); 

下面是相关的HTML:

<table id="listOfFile" class="table table-hover sorted_table"> 
        <thead class="head"> 
         <tr> 
          <td class="filename">File name</td> 
          <td class="type">Type</td> 
          <td class="detail">Details</td> 
          <td class="status">Status</td> 
          <td></td> 
         </tr> 
        </thead> 
        <tbody class="body"> 
        </tbody> 
       </table> 

回答

2

您需要添加样式....这样的事情:

/** Define arrowhead **/ 
.sorted_table tr.placeholder:before { 
    content: ""; 
    width: 0; 
    height: 0; 
    margin-top: -5px; 
    left: -5px; 
    top: -4px; 
    border: 5px solid transparent; 
    border-left-color: red; 
    border-right: none; 
}