You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
351 B
JavaScript
17 lines
351 B
JavaScript
13 years ago
|
/**
|
||
|
* Automatically detect IP addresses in dot notation. Goes perfectly with the
|
||
|
* IP address sorting function.
|
||
|
* @name IP address detection
|
||
|
* @author Brad Wasson
|
||
|
*/
|
||
|
|
||
|
jQuery.fn.dataTableExt.aTypes.unshift(
|
||
|
function ( sData )
|
||
|
{
|
||
|
if (/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(sData)) {
|
||
|
return 'ip-address';
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
);
|