SHARE
TWEET

datatable api

sangueroots Feb 28th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.   var dt = $('#example').dataTable();
  3.   dt.fnDestroy();
  4. });
  5.  
  6. $(document).ready(function() {
  7.   var url = 'https://reqres.in/api/users';
  8.   var table = $('#example').DataTable({
  9.     ajax: url,
  10.     columns: [
  11.     {data: 'id'},
  12.     {data: 'first_name'}
  13.     ]});
  14. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top