File: demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/type-detection/formatted-num.js

Recommend this page to a friend!
  Classes of Emmanuel Podvin   Blapy   demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/type-detection/formatted-num.js   Download  
File: demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/type-detection/formatted-num.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Blapy
jQuery plugin to load linked pages using AJAX
Author: By
Last change: Update of demos/startbootstrap-sb-admin-2/bower_components/datatables-plugins/type-detection/formatted-num.js
Date: 2 years ago
Size: 902 bytes


Class file image Download
/** * This plug-in will strip out non-numeric formatting characters such that a * formatted number (for example 1,000,000) can be detected automatically and * sorted numerically. Note that characters a-z are not automatically removed, * otherwise there is a risk of detecting columns as numeric which should not * be. * * DataTables 1.10+ has formatted number type detection and sorting abilities * built-in. As such this plug-in is marked as deprecated, but might be useful * when working with old versions of DataTables. * * @name Formatted numbers * @summary formatted_numbers * @deprecated * @author [Allan Jardine]( */ jQuery.fn.dataTableExt.aTypes.unshift( function ( sData ) { var deformatted = sData.replace(/[^\d\-\.\/a-zA-Z]/g,''); if ( $.isNumeric( deformatted ) || deformatted === "-" ) { return 'formatted-num'; } return null; } );