1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Update media/src/ext/ext.paging.js

Use hasChildNodes() rather than childNodes.length

See the following jsperf test for the difference in performance:
http://jsperf.com/haschildnodes-vs-childnodes-length
This commit is contained in:
Tim Tucker 2012-08-31 18:32:01 -03:00
parent 0d47107906
commit d8d7759613

View File

@ -1,4 +1,3 @@
/*
* Variable: oPagination
* Purpose:
@ -223,7 +222,7 @@ $.extend( DataTable.ext.oPagination, {
/* Loop over each instance of the pager */
for ( i=0, iLen=an.length ; i<iLen ; i++ )
{
if ( an[i].childNodes.length === 0 )
if ( !an[i].hasChildNodes() )
{
continue;
}