liste

In this example below you will see how to do a liste with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by salihDemircan, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright salihDemircan ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>liste</title>
  
  
  <link rel='stylesheet prefetch' href='https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css'>

  
  
</head>

<body>

  <table id="example" class="display" width="100%" cellspacing="0">
  <thead>
    <tr>
      <th>Username</th>
      <th>Ad</th>
      <th>Email</th>
      <th>Website</th>
    </tr>
  </thead>
</table>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src='https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/salihDemircan/liste-eRQqxw */
$(document).ready(function () {

  var table = $('#example').DataTable({
    'ajax': {
      type: 'GET',
      'url': 'https://jsonplaceholder.typicode.com/users',
      dataSrc: '',
      'data': function (d) {
        return JSON.stringify( d );
      }
    },
    columns: [
        { data: "username" },
        { data: "name" },
        { data: "email" },
        { data: "website" }
    ]
  });   
});

Comments