PHP Classes

File: source/asset/crules/datatables-plugins/sorting/scientific.js

Recommend this page to a friend!
  Classes of ask sa sa   Rimau waf   source/asset/crules/datatables-plugins/sorting/scientific.js   Download  
File: source/asset/crules/datatables-plugins/sorting/scientific.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Rimau waf
Application to configure Web server module options
Author: By
Last change:
Date: 1 year ago
Size: 765 bytes
 

Contents

Class file image Download
/** * This plug-in will treat numbers which are in scientific notation (for * example `1E-10`, `1.2E6` etc) and sort them numerically. * * @name Scientific notation sorting * @summary Sort data which is written in exponential notation. * @author [Nick Schurch](http://datatables.net/forums/profile/21757/nickschurch) * * @example * $('#example').dataTable( { * columnDefs: [ * { type: 'scientific', targets: 0 } * ] * } ); */ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "scientific-pre": function ( a ) { return parseFloat(a); }, "scientific-asc": function ( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "scientific-desc": function ( a, b ) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); } } );