JAVASCRIPT_JQUERY
Table row 위치 변경 스트립트
꾸보이
2020. 4. 3. 17:21
728x90
$(document).on('click', 'a.move',function(e) { var row = $(this).closest('tr'); if ($(this).hasClass('up')){ row.prev().before(row);return false; }else{ row.next().after(row);return false; } return false; }); |
테이블 내 적용
< a href="#" class="move btnSmall up" >↑< /a>
< a href="#" class="move btnSmall down" >↓< /a>
728x90