mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
Updated: Slightly faster code for _fnStringToCss - thanks to sd_zuo, 3036
This commit is contained in:
parent
1e9aaee457
commit
1dd9630d53
6
media/js/jquery.dataTables.js
vendored
6
media/js/jquery.dataTables.js
vendored
@ -5477,12 +5477,12 @@
|
||||
return s+"px";
|
||||
}
|
||||
|
||||
if ( s.indexOf('em') != -1 || s.indexOf('%') != -1 || s.indexOf('ex') != -1 ||
|
||||
s.indexOf('px') != -1 || s.indexOf('pt') != -1 )
|
||||
/* Check if the last character is not 0-9 */
|
||||
var c = s.charCodeAt( s.length-1 );
|
||||
if (c < 0x30 || c > 0x39)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
return s+"px";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user