'use strict'; $(document).on('page_ready', function() { var tableOptions = {}; var queryString = window.location.search; tableOptions.ajax = 'edit_users.php' + queryString; tableOptions.columnDefs = getTypes($('#users_table')); tableOptions.buttons = [ { extend: 'colvis' }, { extend: 'copy', text: '', header: false, title: null, customize: function(data) { return data.replace(/\n/g, ', ').replace(/\r/g, ''); }, exportOptions: { columns: '#col_email' } } ] makeDataTable('#users_table', tableOptions, {leftColumns: 1}); });