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

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

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 append list 
Javascript :: how to assign variables in javascript 
Javascript :: json comment 
Javascript :: salvar no localStorage react 
Javascript :: password reset passport-local mongoose 
Javascript :: javascript prototype inheritance example 
Javascript :: iframe url redirect 
Javascript :: accordion reatjs 
Javascript :: make dots in three js 
Javascript :: like in mongodb 
Javascript :: Sum of Digits / Digital Root 
Javascript :: threemeshphonematerial url image three js 
Javascript :: alertify js vue 
Javascript :: Select HTML elements by CSS selectors 
Javascript :: replacing a value in string using aregular expression pyhton 
Javascript :: array of obj to obj with reduce 
Javascript :: check if all values in array are zero javascript 
Javascript :: how to use findoneandupdate 
Javascript :: how to split an array into two javascript 
Javascript :: new line javascript string 
Javascript :: jquery ajax download file 
Javascript :: jalali moment get milisocnds 
Javascript :: react usememo 
Javascript :: discord.js if no arguments 
Javascript :: How to pass data in Link of react-router-dom 
Javascript :: counting sheep 
Javascript :: queryselectors select element whole class 
Javascript :: javascript number if .00 truncate 
Javascript :: how to change array element to integer in js 
Javascript :: javascript array sorting 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =