2013-03-12 8 views
6

Aktualizacja użyciu position: relative: td, th wtedy, gdy przeciąganieTabela kwestia granicy w chromie po jquery przeciągnij zatrzymać

enter image description here

Tabela granica zniknie po jquery przeciągnij

enter image description here

pracy dobrze w mozila i ie, ale nie w chromie

jsfiddle here

HTML

<table> 
    <tr> 
     <th>id</th> 
     <th>name</th> 
     <th>city</th> 
    </tr> 
     <tr class="person"> 
     <td>1</td> 
     <td>abc</td> 
     <td>abc</td> 
    </tr> 
     <tr class="person"> 
     <td>2</td> 
     <td>xyz</td> 
     <td>xyz</td> 
    </tr> 
</table> 

CSS

table{ 
    border-collapse : collapse; 
} 

td, th{ 
    border : 1px solid #000; 
    padding : 5px 20px; 
} 

th{ 
    background-color : #f3f3f3; 
} 

.drag { 
    background-color : #f3f3f3; 
    height : 20px; 
    width : 100px; 
} 

JS

$('.person').draggable({ 
    helper : function(){ 
     return $('<div class="drag">Drag me</div>') 
    }, 
    cursor : 'crosshair', 
    cursorAt : {left : 50}, 
    start : function(){ 
     $(this).hide(); 
    }, 
    stop : function(){ 
      $(this).show(); 
    } 
}); 

Odpowiedz

1

Usunięcie obramowania z tabeli css najwyraźniej przyniosło efekt.

table{ 
     /* border-collapse : collapse */ 
} 

Wyjazd na http://jsfiddle.net/YTZrj/1/

+0

to nie działa. –

+0

Sprawdzam tylko w Chrome, a przy moich działa, dolna granica pokazuje dobrze – zdesam