Posts Datatables example minimal 87kb dependencies
Post
Cancel

Datatables example minimal 87kb dependencies

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
//https://datatables.net/

$(document).ready(function() {
    $('#main_table_countries').dataTable({
        "scrollCollapse": true,
        "order": [
            [1, 'desc']
        ],
        "sDom": '<"bottom"flp><"clear">',
        "paging": false
    });
});

<table id="main_table_countries" class="table table-bordered table-hover" cellspacing="0" text-align:left"="">
<thead>
    <tr>
        <th width="100">
            Country,  
Other
        </th>
        <th width="20">
            Total  
Cases
        </th>
        <th width="30">
            New  
Cases
        </th>
        <th width="30">
            Total  
Deaths
        </th>
        <th width="30">
            New  
Deaths
        </th>
        <th width="30">
            Active  
Cases
        </th>
        <th width="30">
            Total  
Recovered
        </th>
        <th width="30">
            Serious,  
Critical
        </th>
    </tr>
</thead>

 <tbody>
    <tr style="    ">
        <td style="font-weight: bold; font-size:15px; text-align:left; padding-left:3px;">
            China
        </td>
        <td style="font-weight: bold; text-align:right">
            80,430
        </td>
        <td style="font-weight: normal; text-align:right;background-color:#FFEEAA;">
            +160
        </td>
        <td style="font-weight: bold; text-align:right;">
            3,013
        </td>
        <td style="font-weight: bold; text-align:right; background-color:red; color:white ">
            +32
        </td>
        <td style="font-size:14px;text-align:right;font-weight:bold;">
            25,158
        </td>
        <td style="font-weight: bold; text-align:right">
            52,259
        </td>
        <td style="font-weight: bold; text-align:right">
            5,952
        </td>
    </tr>
    <tr style="    ">
        <td style="font-weight: bold; font-size:15px; text-align:left; padding-left:3px;">
            Italy
        </td>
        <td style="font-weight: bold; text-align:right">
            3,089
        </td>
        <td style="font-weight: normal; text-align:right;">
        </td>
        <td style="font-weight: bold; text-align:right;">
            107
        </td>
        <td style="font-weight: bold; text-align:right; ">
        </td>
        <td style="font-size:14px;text-align:right;font-weight:bold;">
            2,706
        </td>
        <td style="font-weight: bold; text-align:right">
            276
        </td>
        <td style="font-weight: bold; text-align:right">
            295
        </td>
    </tr>

    <tr style="background-color:#EAF7D5    ">
        <td style="font-weight: bold; font-size:15px; text-align:left; padding-left:3px;">
            Vietnam
        </td>
        <td style="font-weight: bold; text-align:right">
            16
        </td>
        <td style="font-weight: normal; text-align:right;">
        </td>
        <td style="font-weight: bold; text-align:right;">
        </td>
        <td style="font-weight: bold; text-align:right; ">
        </td>
        <td style="font-size:14px;text-align:right;font-weight:bold;">
            0
        </td>
        <td style="font-weight: bold; text-align:right">
            16
        </td>
        <td style="font-weight: bold; text-align:right">
        </td>
    </tr>
</tbody>

<tbody>
    <tr class="total_row">
        <td>
             **Total:** 
        </td>
        <td>
            96,979
        </td>
        <td style="background-color:#FFEEAA; color:#000;">
            1,811
        </td>
        <td>
            3,311
        </td>
        <td style="background-color:red; color:#fff">
            57
        </td>
        <td>
            39,685
        </td>
        <td>
            53,983
        </td>
        <td>
            6,422
        </td>
    </tr>
</tbody>
 </table>

author - https://sprymedia.co.uk/


https://datatables.net/reference/api/rows().data()

https://datatables.net/manual/data/

https://datatables.net/reference/option/

https://datatables.net/examples/ajax/objects.html

https://datatables.net/reference/option/ajax.data

https://github.com/DataTables/DataTables/tree/master/examples

origin - https://www.pipiscrew.com/?p=17283 datatables-example-minimal-87kb-dependencies

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags