Answer the question
In order to leave comments, you need to log in
Why doesn't jquery DataTables example work (fixed headers in table)?
here is an example:
https://datatables.net/extensions/fixedheader/exam...
- I liked it very much, but for some reason the fixed header of the table does not work, there are no errors in the console either ..
How I do it:
copied files from example all :
except jquery itself.
to my project:
in the view I connect this css and this js
$this->registerCssFile('/css/fixHeader.css');
$this->registerJsFile('/js/fixHeadersTable.js');
$this->registerAssetBundle(yii\web\JqueryAsset::className(), yii\web\View::POS_HEAD);
Answer the question
In order to leave comments, you need to log in
it seems that the problem was in the style conflict, everything worked
Almost 100% sure that the problem is not using thead and tbody tags. Do you have them in your inventory?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question