javascript69 [dataTables.js] colspan 오류 해결 Ashton Cox N/A 2009/01/12 $86,000 colspan="n" n-1개만큼 추가 2020. 5. 20. html 수정(edit), 저장(save) 버튼 만들기 $(document).on('click', 'a.edit-row', function (e) { e.preventDefault(); var _self = $(this); var row = $(this).closest('tr'); row.find('.on-editing').removeAttr('hidden'); row.find('.on-default').attr('hidden', true); row.children('td').each(function (i) { var _this = $(this); var content = $(this).text(); if (!_this.hasClass('actions')) { _this.html(''); } }); }).on('click', 'a.save-row', func.. 2020. 5. 18. modal 여러개 겹칠 때 z-index 설정하기 $(document).on('show.bs.modal', '.modal', function (event) { var zIndex = 1040 + (10 * $('.modal:visible').length); $(this).css('z-index', zIndex); setTimeout(function() { $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'); }, 0); }); 2020. 5. 15. [dataTables.js] 테이블 스크롤 vertical scrollY $('#table_01').DataTable({ scrollY: '400', scroller: true, responsive: true }); 2020. 5. 13. [dataTables.js] overflow-x scroll .overflow-x-auto .table {width: auto!important; table-layout: fixed; white-space: nowrap;} .overflow-x-auto .table td {min-width: 80px;} $(document).ready(function() { $('#example').DataTable( { "scrollX": true } ); } ); 2020. 5. 6. [dataTables.js] remove 버튼 만들기 var myTable = $('#table_02').DataTable(); $(document).on('click', 'a.remove-row', function (e) { e.preventDefault(); var rows = $(this).closest('tr'); bootbox.dialog({ message: '삭제하시겠습니까?', buttons: { main: { label: "취소", className: "btn-default", callback: function callback() {} }, danger: { label: "확인", className: "btn-primary", callback: function callback() { rows.remove(); } } } }); }); 2020. 4. 22. [dataTables.js] row 노출개수 lengthMenu custom $('#table_paging').DataTable({ language: { "lengthMenu": ''+ '10쪽'+ '20쪽'+ '30쪽'+ '40쪽'+ '' } }); 2020. 4. 22. [dataTables.js] 테이블 요소 배치 dom positioning $('#table_paging').DataTable({ searching: false, "dom": 'rt' }); https://datatables.net/examples/basic_init/dom.html DataTables example - DOM positioning DOM positioning When customising DataTables for your own usage, you might find that the default position of the feature elements (filter input etc) is not quite to your liking. To address this issue DataTables takes inspiration from the CSS 3 A.. 2020. 4. 22. [dataTables.js] 페이지네이션 html 수정 pagination custom $('#table_paging').DataTable({ language: { paginate: { previous: '', next: '' }, } }); 2020. 4. 22. 이전 1 2 3 4 5 6 7 8 다음