1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-30 12:24:10 +01:00

Fix: Correctly add the sClass to the TH elements in the header

This commit is contained in:
Allan Jardine 2010-11-04 21:26:11 +00:00
parent 74654f84f4
commit 5b677bcdf7

View File

@ -2842,6 +2842,11 @@
{
nTh = oSettings.aoColumns[i].nTh;
if ( oSettings.aoColumns[i].sClass !== null )
{
$(nTh).addClass( oSettings.aoColumns[i].sClass );
}
/* Cache and remove (if needed) any extra elements for this column in the header */
for ( j=1, jLen=anTr.length ; j<jLen ; j++ )
{
@ -2878,13 +2883,13 @@
nTh = oSettings.aoColumns[i].nTh;
nTh.innerHTML = oSettings.aoColumns[i].sTitle;
if ( oSettings.aoColumns[i].sClass !== null )
{
$(nTh).addClass( oSettings.aoColumns[i].sClass );
}
if ( oSettings.aoColumns[i].bVisible )
{
if ( oSettings.aoColumns[i].sClass !== null )
{
nTh.className = oSettings.aoColumns[i].sClass;
}
nTr.appendChild( nTh );
}
}