Server IP : 150.95.80.236 / Your IP : 3.145.179.177 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/sc.pcu.in.th/demo15/src/js/custom/documentation/general/datatables/ |
Upload File : |
"use strict"; // Class definition var KTDatatablesApi = function () { // Private functions var _initExample1 = function() { var t = $("#kt_datatable_example_1").DataTable(); var counter = 1; $("#kt_datatable_example_1_addrow").on( "click", function () { t.row.add( [ counter +".1", counter +".2", counter +".3", counter +".4", counter +".5", ] ).draw( false ); counter++; } ); // Automatically add a first row of data $("#kt_datatable_example_1_addrow").click(); } var _initExample2 = function() { var table = $("#kt_datatable_example_2").DataTable({ columnDefs: [{ orderable: false, targets: [1,2,3] }] }); $("#kt_datatable_example_2_submit").click( function() { var data = table.$("input, select").serialize(); alert( "The following data would have been submitted to the server: \n\n"+ data.substr( 0, 120 )+"..." ); return false; }); } // Public methods return { init: function () { _initExample1(); _initExample2(); } } }(); // On document ready KTUtil.onDOMContentLoaded(function() { KTDatatablesApi.init(); });