Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquey datatables

HTML
1
2
3
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
  
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"></script>
Comment

using datatable

//html
<table id="table" class="table table-striped table-bordered dt-responsive display nowrap" style="width: 100%!important;">
  <thead class="thead-light"></thead>
</table>

//js
var table = $('#table').DataTable({
    processing: true,
    searching : true,
    paging    : true,
    pageLength: 25,
    ordering  : false,
    data      : data,
    columns: [
        {data: 'id', title: '#'},
        {data: 'name', className: "text-center", title: 'Name'},
        {
          data: function(row){
            return "</a><a class='ui icon blue button' href='/name/view/" + row.id + "'><i class='fas fas fa-search'></i></a>&nbsp;&nbsp;&nbsp;<a class='ui icon blue button' href='/name/" + row.id + "'><i class='fas fa-pencil-alt'></i></a>"
          },
          searchable: false,
          orderable : false,
          className: "text-center",
          title: 'Actions'
        },
    ],
    lengthMenu: [
        [ 25, 50, -1 ],
        [ '25 rows', '50 rows', 'Show all' ]
    ]
  })

jQuery('.dataTable').wrap('<div class="dataTables_scroll" />');

//style
.dataTables_scroll
{
    overflow:auto;
}
Comment

datatable in html

1
2
3
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.css">

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.js"></script>
Comment

DataTables

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js"></script>
Comment

datatable dom

The built-in table control elements in DataTables are:

l - length changing input control
f - filtering input
t - The table!
i - Table information summary
p - pagination control
r - processing display element
B - Buttons
Comment

datatable

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.22/datatables.min.css"/>
 
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.22/datatables.min.js"></script>
Comment

jquery datatable

HTML
1
2
3
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.css">
  
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script>
Comment

jquery datatable

HTML
1
2
3
<link rel="stylesheet" type="text/css" href="/DataTables/datatables.css">
 
<script type="text/javascript" charset="utf8" src="/DataTables/datatables.js"></script>
Comment

datatables

datatable(m, escape = FALSE)
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript document get by attribute 
Javascript :: get the last item in an array 
Javascript :: closure example 
Javascript :: name function in javascript 
Javascript :: how to remove an item from an object in javascript 
Javascript :: create slice redux 
Javascript :: install tailwind css with next js 
Javascript :: react-hook-form-input npm 
Javascript :: convert excel file to json using node js 
Javascript :: how to check empty string array in javascript 
Javascript :: spread operator react array 
Javascript :: chrome.contextmenus 
Javascript :: create responsive navbar without javascript 
Javascript :: javascript number() method 
Javascript :: object properties 
Javascript :: react -native-config 
Javascript :: js parse bool 
Javascript :: discord role giver 
Javascript :: how to break from map in javascript 
Javascript :: update TextInput value react-hook-form react-admin 
Javascript :: discord js people in voice channel 
Javascript :: change one element in array javascript 
Javascript :: mouse wheel scroll sections in react 
Javascript :: set twig variable from javascript 
Javascript :: change h2 to h1 using javascript 
Javascript :: showdown react 
Javascript :: windows 10 retiré le theme sombre explorateur 
Python :: tkinter how to make a root non rezizable 
Python :: drop last row pandas 
Python :: simple flask hello world 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =