JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
<script src="//cdn.datatables.net/plug-ins/1.13.4/sorting/natural.js"></script>
<div class="table-responsive">
<table id="tabella-catalogo" class="table dt-responsive activate-select cell-border table-hover" style="width: 100%;">
<thead>
<tr>
<th class=''>Seriale</th>
<th class=''>Codice</th>
</tr>
</thead>
<tbody>
<tr>
<td> bil_14.000_10</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_9</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_8</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_7</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_6</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_5</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_4</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_3</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_2</td>
<td> 14.000</td>
</tr>
<tr>
<td> bil_14.000_1</td>
<td> 14.000</td>
</tr>
</tbody>
</table>
</div>
JavaScript
/*! © SpryMedia Ltd, Jim Palmer, Michael Buehler, Mike Grier, Clint Priest, Kyle Adams, guillermo - datatables.net/license */
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
var jq = require('jquery');
var cjsRequires = function (root, $) {
if ( ! $.fn.dataTable ) {
require('datatables.net')(root, $);
}
};
if (typeof window !== 'undefined') {
module.exports = function (root, $) {
if ( ! root ) {
// CommonJS environments without a window global must pass a
// root. This will give an error otherwise
root = window;
}
if ( ! $ ) {
$ = jq( root );
}
cjsRequires( root, $ );
return factory( $, root, root.document );
};
}
else {
cjsRequires( window, jq );
module.exports = factory( jq, window, window.document );
}
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
'use strict';
var DataTable = $.fn.dataTable;
/**
* Data can often be a complicated mix of numbers and letters (file names
* are a common example) and sorting them in a natural manner is quite a
* difficult problem.
*
* Fortunately a deal of work has already been done in this area by other
* authors - the following plug-in uses the [naturalSort() function by Jim
* Palmer](http://www.overset.com/2008/09/01/javascript-natural-sort-algorithm-with-unicode-support) to provide natural sorting in DataTables.
*
* @name Natural sorting
* @summary Sort data with a mix of numbers and letters _naturally_.
* @author [Jim Palmer](http://www.overset.com/2008/09/01/javascript-natural-sort-algorithm-with-unicode-support)
* @author [Michael Buehler] (https://github.com/AnimusMachina)
*
* @example
* $('#example').dataTable( {
* columnDefs: [
* {...