, 내가 표 1 이 TR을 추가하고 표 1에 추가하기 전에 테이블 내부의 TR에서 TD를 제거하는 방법, 난이 특정 TD는 제거 버튼의 클릭에
<td><a data-videoid="6" class="btn btn-delete removevideo btn-danger ui-link">Remove</a></td>
을 제거해야
이이 내 바이올린 내 코드
$(document).on("click", ".removevideo", function(event)
{
if (confirm("Are You Sure to Remove This Video From This PAC?") == true)
{
var video_id = $(this).data('videoid');
$(this).closest("tr").removeClass('existingvideos');
var html = $('#table1 tr[video-id="'+video_id+'"]').prop('outerHTML');
$('#table1 tr[video-id="'+video_id+'"]').remove();
$("#table2 tbody").append(html);
}
event.stopImmediatePropagation();
event.preventDefault();
return false;
});
입니다
http://jsfiddle.net/cod7ceho/271/
http://stackoverflow.com/questions/40374508/is-it-possible-to-remove-a-table-row-based-on-the-data-attribute – Satpal