Fixed Header - calculating the size of cells

Fixed Header - calculating the size of cells

MatthieuMatthieu Posts: 1Questions: 1Answers: 0

Hello,

It is not a question but a user back on the use of FixedHeader and a encountered problems.

I set up the use of FixedHeader for DataTables in my company's software.

However, during integration, there was a huge gap between the size of celulles my new header created by the extension and celulles of the first line of tbody.

After that, I looked at the code for calculating these sizes celulles (the focntion: _matchWidths dataTables.fixedHeader the file). FixedHeader uses the width according to the size we return but recovering the size provided by the CSS of the ten elementary using css ( 'width), I have not been offset worries.

Because there is a difference between the width calculation function () and css ( 'width):

" The difference between .css(width) and .width() is that the latter returns a unit-less pixel value (for example, 400) while the former returns a value with units intact (for example, 400px). The .width() method is recommended when an element's width needs to be used in a mathematical calculation."

Link: http://api.jquery.com/width/

So allow me to point out this difference in interpretation between the two methods to enable a better result as needed

cordially
Matthieu

This discussion has been closed.